/* social module: the track page, comments on the waveform, the crate picker, favorites, my crates, my DJ charts.
   Every class here starts with tp- (track page), tw- (big waveform), cm- (comments), cx- (crate picker),
   lib- (library pages), lr- (reorderable lists) or dc- (DJ chart builder) so nothing leaks into other modules. */

/* ---------------- track page head ---------------- */
.tp { display: block; }
.tp-head { position: relative; isolation: isolate; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 34px; align-items: center;
  margin: calc(-1 * (var(--top-h) + 6px)) calc(-1 * var(--gutter)) 0; padding: calc(var(--top-h) + 34px) var(--gutter) 30px; }
[data-flash] ~ .tp .tp-head { margin-top: 0; padding-top: 30px; }
.tp-glow { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.tp-glow::before { content: ""; position: absolute; inset: -80px; background-image: var(--art); background-size: cover; background-position: center; filter: blur(70px) saturate(1.35); opacity: .5; }
.tp-head::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(18, 18, 18, .15) 0%, rgba(18, 18, 18, .55) 55%, var(--surface) 100%); }
.tp-cover { width: 100%; box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.tp-info { min-width: 0; }
.tp-note { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border-radius: var(--r); background: rgba(0, 0, 0, .45); color: var(--warn); font-size: 13px; }
.tp-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.tp-kicker .kicker { margin: 0; color: var(--text-2); }
.tp-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 2px; background: #fff; color: #000; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.tp-tag.excl { background: var(--accent); color: var(--accent-ink); }
.tp-tag.free { background: var(--ok); color: #062b1a; }
.tp-title { font-size: clamp(28px, 3.6vw, 48px); font-weight: 300; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tp-title .v { color: var(--text-2); font-weight: 300; }
.tp-artists { margin-top: 10px; font-size: 16px; color: var(--text); }
.tp-artists a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tp-artists .sep { color: var(--text-3); }
.tp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 22px; }
.tp-actions .btn { height: 40px; }
.tp-actions .buy { height: 40px; padding: 0 16px; font-size: 14px; background: #fff; color: #000; }
.tp-actions .buy:hover { background: #e2e2e2 !important; }
.tp-actions .buy.in-cart { background: var(--accent) !important; color: var(--accent-ink); }
.tp-actions .buy.owned { background: transparent; color: var(--ok); }
.tp-actions .buy.owned:hover { background: var(--ok) !important; color: #062b1a; }
.tp-actions .play-sq.lg { width: 48px; height: 48px; }
.tp-actions .btn-line { background: rgba(0, 0, 0, .25); }
.tp-actions .btn-line:hover { background: var(--raised); }
.tp-like.is-on { color: var(--accent); }
.tp-like span { font-variant-numeric: tabular-nums; }
.tp-more { width: 40px; padding: 0; }
.tp-actions .menu { right: 0; left: auto; top: calc(100% + 6px); min-width: 236px; }
.tp-actions .menu a, .tp-actions .menu button { white-space: nowrap; }
.tp-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 24px; margin: 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.tp-facts > div { min-width: 0; }
.tp-facts dt { color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
.tp-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; min-width: 0; }
.tp-facts dd a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tp-facts dd a:hover { text-decoration: underline; text-underline-offset: 2px; }
.tp-facts dd .muted { font-size: 12.5px; }
.tp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.tp-mix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tp-mix-l { color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-right: 4px; }
.tp-mix .key { height: 24px; min-width: 40px; font-size: 12px; transition: filter .15s; }
.tp-mix .key:hover { filter: brightness(1.35); }
.tp-report { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; }
.tp-report:hover { color: var(--text); }

/* ---------------- the big waveform ---------------- */
.tw-wrap { margin: 6px 0 36px; padding: 26px 20px 12px; border-radius: var(--r); background: var(--frame); }
.tw { position: relative; height: 150px; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tw:focus-visible { outline-offset: 6px; }
.tw canvas { display: block; width: 100%; height: 100%; }
.tw-win { position: absolute; top: -14px; height: 6px; border: 1px solid rgba(166, 145, 117, .7); border-bottom: 0; pointer-events: none; }
.tw-win span { position: absolute; left: -1px; bottom: calc(100% + 1px); color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1; white-space: nowrap; }
.tw-hover { position: absolute; top: calc(70% - 30px); transform: translateX(-50%); padding: 2px 6px; border-radius: 3px; background: var(--text); color: var(--base); font-size: 11px; font-weight: 600; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tw-avs { position: absolute; left: 0; right: 0; top: calc(70% - 9px); height: 18px; pointer-events: none; }
.tw-av { position: absolute; top: 0; width: 18px; height: 18px; margin-left: -9px; display: grid; place-items: center; border-radius: 999px; overflow: hidden; pointer-events: auto; cursor: pointer;
  background: hsl(var(--h, 0) 38% 42%); color: #fff; font-size: 7.5px; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 0 0 2px var(--frame); transition: transform .12s; }
.tw-av img { width: 100%; height: 100%; object-fit: cover; }
.tw-av:hover, .tw-av.is-on { transform: scale(1.45); z-index: 3; }
.tw-pop { position: absolute; bottom: calc(30% + 16px); z-index: 5; transform: translateX(-50%); width: max-content; max-width: min(320px, 90%); padding: 9px 12px; border-radius: var(--r); background: var(--raised); box-shadow: var(--shadow); font-size: 13px; pointer-events: none; }
.tw-pop-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.tw-pop-h b { font-weight: 600; font-size: 12.5px; }
.tw-pop-h span { color: var(--text-3); font-size: 12px; }
.tw-pop p { margin: 0; color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.tw-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--text-3); font-size: 12px; }
.tw-help { text-align: center; }

/* ---------------- comments + side column ---------------- */
.tp-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; margin: 0 0 40px; }
.tp-body > .tp-side:only-child { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.tp-comments { min-width: 0; scroll-margin-top: calc(var(--top-h) + 12px); }
.tp-comments .section-head { flex-wrap: wrap; }
.tp-count { color: var(--text-3); font-size: 16px; margin-left: 4px; font-variant-numeric: tabular-nums; }
.cm-sort { display: flex; gap: 2px; }
.cm-sort button { height: 30px; padding: 0 11px; border-radius: var(--r-btn); color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.cm-sort button:hover { color: var(--text); background: var(--raised); }
.cm-sort button.is-active { background: var(--raised); color: var(--text); }

.cm-composer { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; margin: 0 0 18px; padding: 0 10px; }
.cm-composer textarea { display: block; width: 100%; min-height: 48px; padding: 11px 13px; border-radius: var(--r); border: 0; background: var(--raised); color: var(--text); line-height: 1.5; resize: none; }
.cm-composer textarea:focus { outline: none; background: var(--sel); }
.cm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.cm-row .btn:last-child { margin-left: auto; }
.cm-at-toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.cm-at-toggle input { width: 15px; height: 15px; accent-color: var(--accent); }
.cm-at-toggle b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-hint { color: var(--text-3); font-size: 12.5px; }
.cm-composer.is-guest { align-items: center; }
.cm-guest { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r); border: 0; background: var(--raised); color: var(--text-3); text-align: left; font-size: 13.5px; }
.cm-guest:hover { background: var(--sel); color: var(--text-2); }
.cm-composer.is-reply { margin: 2px 0 10px; padding: 0 10px; grid-template-columns: 28px minmax(0, 1fr); }
.cm-composer.is-reply .cm-av { width: 28px; height: 28px; font-size: 10.5px; }
.cm-composer.is-reply textarea { min-height: 40px; padding: 8px 11px; }

.cm-list { display: grid; }
.cm-thread { padding: 4px 0; }
.cm-thread + .cm-thread { box-shadow: 0 -1px 0 var(--line); }
.cm { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 10px; border-radius: var(--r); transition: background .8s; }
.cm.is-flash { background: var(--sel); transition: none; }
.cm.is-hidden { opacity: .5; }
.cm-av { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; overflow: hidden; background: hsl(var(--h, 0) 30% 32%); color: #fff; font-size: 12px; font-weight: 600; flex: none; }
.cm-av img { width: 100%; height: 100%; object-fit: cover; }
.cm-main { min-width: 0; }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; }
.cm-head strong { font-weight: 600; }
.cm-badge { padding: 1px 5px; border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cm-at { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px 0 6px; border-radius: 3px; background: var(--raised); color: var(--text); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cm-at svg.i { width: 9px; height: 9px; }
.cm-at:hover { background: #fff; color: #000; }
.cm-time { color: var(--text-3); font-size: 12px; }
.cm-flag { padding: 1px 6px; border-radius: 2px; background: rgba(255, 138, 122, .14); color: var(--danger); font-size: 11px; font-weight: 600; }
.cm-body { margin: 4px 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 13.5px; }
.cm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.cm-like { display: inline-flex; align-items: center; gap: 5px; height: 26px; color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cm-like:hover { color: var(--text); }
.cm-like.is-on { color: var(--accent); }
.cm-link { height: 26px; color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.cm-link:hover { color: var(--text); }
.cm-replies { margin-left: 48px; }
.cm-replies .cm { grid-template-columns: 28px minmax(0, 1fr); padding: 8px 10px; }
.cm-replies .cm-av { width: 28px; height: 28px; font-size: 10.5px; }
.cm-empty { margin: 8px 10px 0; padding: 26px 18px; border-radius: var(--r); background: var(--frame); color: var(--text-3); text-align: center; }

.tp-side { display: grid; gap: 22px; min-width: 0; }
.tp-stats { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); padding: 16px 6px; border-radius: var(--r); background: var(--frame); text-align: center; }
.tp-stats > div + div { box-shadow: -1px 0 0 var(--line); }
.tp-stats b { display: block; font: 300 22px/1.15 var(--sans); }
.tp-stats span { color: var(--text-3); font-size: 12px; }
.tp-feat h3 { font-size: 16px; margin: 0 0 10px; }
.tp-feat-i { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 12px; padding: 6px; border-radius: var(--r); }
.tp-feat-i:hover { background: var(--raised); }
.tp-feat-img { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 3px; overflow: hidden; background: var(--sel); color: var(--text-3); }
.tp-feat-img img { width: 100%; height: 100%; object-fit: cover; }
.tp-feat-i b { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.tp-feat-i small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- the "Add to crate" box ---------------- */
.cx-sub { margin: -8px 0 14px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-list { display: grid; gap: 2px; max-height: min(46vh, 340px); overflow: auto; margin: 0 -8px 14px; }
.cx-msg { margin: 10px 8px; }
.cx-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 7px 8px; border-radius: var(--r); text-align: left; color: var(--text-2); }
.cx-item:hover { background: var(--sel); color: var(--text); }
.cx-item[disabled] { opacity: .6; }
.cx-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 3px; background: var(--sel); color: var(--text-2); }
.cx-item.is-in .cx-ic { background: var(--accent); color: var(--accent-ink); }
.cx-txt { min-width: 0; }
.cx-txt b { display: block; color: var(--text); font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-txt small { display: block; color: var(--text-3); font-size: 12px; }
.cx-state { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: var(--r-btn); background: var(--base); color: var(--text-2); font-size: 12px; font-weight: 600; }
.cx-item.is-in .cx-state { color: var(--accent); }
.cx-new { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cx-new .input { height: 40px; }
.cx-new .btn { height: 40px; }
.cx-actions { justify-content: space-between !important; }

/* ---------------- library pages ---------------- */
.lib-head { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 26px; align-items: end; margin: 14px 0 26px; }
.lib-head.no-art { grid-template-columns: minmax(0, 1fr); }
.lib-art { position: relative; width: 180px; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; background: var(--raised); display: grid; place-items: center; color: var(--text-3); box-shadow: 0 12px 34px rgba(0, 0, 0, .45); }
.lib-art img { width: 100%; height: 100%; object-fit: cover; }
.lib-art .lib-mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.lib-art .lib-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.lib-art svg.i { width: 44px; height: 44px; stroke-width: 1.2; }
.lib-info { min-width: 0; }
.lib-info h1 { font-size: clamp(26px, 3vw, 40px); line-height: 1.12; overflow-wrap: anywhere; }
.lib-info .kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lib-desc { margin: 8px 0 0; color: var(--text-2); max-width: 70ch; white-space: pre-line; }
.lib-meta { margin-top: 8px; color: var(--text-3); font-size: 13px; }
.lib-meta b { color: var(--text-2); font-weight: 500; }
.lib-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.lib-actions form { margin: 0; }
.lib-status { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 2px; background: var(--raised); color: var(--text-2); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.lib-status svg.i { width: 11px; height: 11px; }
.lib-status.is-live { background: rgba(139, 227, 182, .14); color: var(--ok); }
.lib-status.is-warn { background: rgba(245, 196, 81, .14); color: var(--warn); }
.lib-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 24px 16px; }
.lib-card { position: relative; min-width: 0; }
.lib-card .cover { display: block; }
.lib-card .cover .lib-mosaic { display: grid; grid-template-columns: 1fr 1fr; width: 100%; height: 100%; }
.lib-card .cover .lib-mosaic img { width: 100%; height: 100%; object-fit: cover; }
.lib-hit { position: absolute; inset: 0; z-index: 1; }
.lib-card .cover .play-sq { z-index: 2; }
.lib-card:hover .cover .play-sq { opacity: 1; transform: none; }
.lib-card .meta { margin-top: 10px; min-width: 0; }
.lib-card .t { display: block; font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-card .t:hover { text-decoration: underline; text-underline-offset: 2px; }
.lib-card .s { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12.5px; margin-top: 2px; overflow: hidden; white-space: nowrap; }
.lib-card .lib-status { position: absolute; left: 8px; top: 8px; z-index: 2; background: rgba(0, 0, 0, .7); color: #fff; }
.lib-card .lib-status.is-live { background: rgba(10, 40, 26, .85); color: var(--ok); }
.lib-card .ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #2b2b2b, #151515); color: var(--text-3); }
.lib-card .ph svg.i { width: 40px; height: 40px; stroke-width: 1.2; }
.lib-new { display: grid; place-items: center; align-content: center; gap: 10px; width: 100%; aspect-ratio: 1; border-radius: var(--r); background: var(--frame); color: var(--text-2); font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; box-shadow: inset 0 0 0 1px var(--line-2); }
.lib-new:hover { background: var(--raised); color: var(--text); }
.lib-new svg.i { width: 30px; height: 30px; }
.lib-new-wrap .meta { visibility: hidden; }

.lib-section { margin: 0 0 34px; }
.lib-section > h2 { font-size: 21px; margin: 0 0 14px; }
.lib-section > h2 .muted { font-size: 15px; }
.lib-form h2 { font-size: 21px; margin: 0 0 16px; }
.lib-form .field input[type=file] { color: var(--text-2); font-size: 13px; }
.lib-photo { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; }
.lib-photo-img { width: 96px; height: 96px; border-radius: var(--r); overflow: hidden; background: var(--raised); display: grid; place-items: center; color: var(--text-3); }
.lib-photo-img img { width: 100%; height: 100%; object-fit: cover; }
.lib-photo .check { margin: 8px 0 0; font-size: 13px; }
.lib-file { position: relative; display: inline-flex; overflow: hidden; }
.lib-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.lib-file-name { display: block; margin-top: 6px; color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-note { margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r); background: rgba(245, 196, 81, .1); color: var(--warn); font-size: 13.5px; }
.lib-empty-cta { margin-top: 6px; }

/* charts list: rows with photo, status and actions */
.lib-charts { display: grid; gap: 2px; margin-bottom: 34px; }
.lib-chart { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px; border-radius: var(--r); }
.lib-chart + .lib-chart { box-shadow: 0 -1px 0 var(--line); }
.lib-chart:hover { background: var(--raised); box-shadow: none; }
.lib-chart:hover + .lib-chart { box-shadow: none; }
.lib-chart-img { width: 64px; height: 64px; border-radius: 3px; overflow: hidden; background: var(--sel); display: grid; place-items: center; color: var(--text-3); }
.lib-chart-img img { width: 100%; height: 100%; object-fit: cover; }
.lib-chart .t { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; font-size: 14px; }
.lib-chart .t a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-chart .t a:hover { text-decoration: underline; text-underline-offset: 2px; }
.lib-chart .s { color: var(--text-3); font-size: 12.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-chart .acts { display: flex; align-items: center; gap: 6px; }

/* ---------------- reorderable lists (crate editor, chart builder) ---------------- */
.lr-list { display: grid; }
.lr { display: grid; grid-template-columns: 26px 28px 44px minmax(0, 1fr) 52px 50px 50px auto; grid-template-areas: "grip n art title bpm key time act"; align-items: center; column-gap: 12px; min-height: 60px; padding: 7px 10px 7px 4px; border-radius: var(--r); background: var(--surface); transition: background .12s; }
.lr + .lr { box-shadow: 0 -1px 0 var(--line); }
.lr:hover { background: var(--raised); box-shadow: none; }
.lr:hover + .lr { box-shadow: none; }
.lr.is-drag { background: var(--sel); box-shadow: var(--shadow); position: relative; z-index: 2; }
.lr-list.is-sorting { user-select: none; -webkit-user-select: none; }
.lr-grip { grid-area: grip; display: grid; place-items: center; width: 26px; height: 40px; color: var(--text-3); cursor: grab; touch-action: none; border-radius: var(--r-btn); }
.lr-grip:hover { color: var(--text); }
.lr.is-drag .lr-grip { cursor: grabbing; color: var(--text); }
.lr-n { grid-area: n; color: var(--text-3); font: 300 17px/1 var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.lr .c-art { grid-area: art; }
.lr:hover .c-art .play-over, .lr .c-art.is-playing .play-over { opacity: 1; }
.lr-t { grid-area: title; min-width: 0; }
.lr-t .t { display: flex; align-items: center; gap: 7px; min-width: 0; font-weight: 500; font-size: 13.5px; }
.lr-t .t a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lr-t .t a:hover { text-decoration: underline; text-underline-offset: 2px; }
.lr-t .v { color: var(--text-3); font-weight: 400; }
.lr-t .s { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.lr-t .s a:hover { color: var(--text); }
.lr-t .m { display: none; gap: 6px; margin-top: 4px; }
.lr-off { color: var(--warn); font-size: 11px; font-weight: 600; }
.lr.is-off .c-art, .lr.is-off .lr-t .t a { opacity: .5; }
.lr-bpm { grid-area: bpm; color: var(--text-2); font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.lr-key { grid-area: key; text-align: center; }
.lr-time { grid-area: time; color: var(--text-3); font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.lr-act { grid-area: act; display: flex; align-items: center; justify-content: flex-end; gap: 2px; }

/* ---------------- DJ chart builder ---------------- */
.dc-meter { position: relative; height: 3px; margin: 10px 0 0; max-width: 260px; background: var(--line-2); --p: 0%; }
.dc-meter::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--p); background: var(--text); transition: width .25s; }
.dc-search { position: relative; margin: 0 0 16px; }
.dc-search-box { position: relative; }
.dc-search-box > svg.i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.dc-search-box input { width: 100%; height: 46px; padding: 0 44px 0 42px; border-radius: var(--r); border: 0; background: var(--raised); color: var(--text); font-size: 14px; }
.dc-search-box input:focus { outline: none; background: var(--sel); }
.dc-search-box input::-webkit-search-cancel-button { display: none; }
.dc-search-box [data-clear] { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.dc-results { margin-top: 8px; padding: 6px; border-radius: var(--r); background: var(--frame); display: grid; gap: 2px; max-height: 440px; overflow: auto; }
.dc-msg { margin: 10px; }
.dc-res { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 8px; border-radius: var(--r); }
.dc-res:hover { background: var(--raised); }
.dc-res:hover .c-art .play-over, .dc-res .c-art.is-playing .play-over { opacity: 1; }
.dc-res-t { min-width: 0; }
.dc-res-t .t { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-res-t .v { color: var(--text-3); font-weight: 400; }
.dc-res-t .s { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-res-m { display: flex; align-items: center; gap: 6px; }
.dc-res .btn { min-width: 86px; }
.dc-res .btn[disabled] { opacity: .6; }

/* ---------------- narrower screens (the stage is a size container) ---------------- */
@container stage (max-width: 1100px) {
  .tp-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tp-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
}
@container stage (max-width: 900px) {
  .tp-head { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
  .tp-actions .tp-lbl { display: none; }
  .lr { grid-template-columns: 26px 26px 44px minmax(0, 1fr) 50px 48px auto; grid-template-areas: "grip n art title bpm key act"; }
  .lr-time { display: none; }
}
@container stage (max-width: 680px) {
  .tp-head { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: calc(var(--top-h) + 14px); padding-bottom: 20px; }
  [data-flash] ~ .tp .tp-head { padding-top: 14px; }
  .tp-cover { width: min(250px, 72%); margin: 0 auto; }
  .tp-title { font-size: 28px; }
  .tp-artists { font-size: 15px; }
  .tp-actions { gap: 6px; margin: 18px 0; }
  .tp-actions .tp-lbl { display: none; }
  .tp-actions .btn { padding: 0 12px; }
  .tp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
  .tp-foot { flex-direction: column; align-items: flex-start; }
  .tw-wrap { padding: 24px 12px 10px; margin-bottom: 28px; }
  .tw { height: 104px; }
  .tw-av { width: 16px; height: 16px; margin-left: -8px; font-size: 6.5px; }
  .tw-avs { top: calc(70% - 8px); }
  .tw-help { display: none; }
  .tp-body { gap: 24px; }
  .tp-side { grid-template-columns: minmax(0, 1fr); }
  .cm-composer { padding: 0; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .cm-composer > .cm-av { width: 30px; height: 30px; font-size: 11px; }
  .cm { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 2px; }
  .cm .cm-av { width: 30px; height: 30px; font-size: 11px; }
  .cm-replies { margin-left: 30px; }
  .cm-replies .cm { grid-template-columns: 24px minmax(0, 1fr); }
  .cm-replies .cm-av { width: 24px; height: 24px; font-size: 9.5px; }
  .cm-composer.is-reply { padding: 0 2px; grid-template-columns: 24px minmax(0, 1fr); }
  .cm-composer.is-reply .cm-av { width: 24px; height: 24px; }
  .tp-comments .section-head { gap: 8px; }
  .lib-head { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: center; }
  .lib-art { width: 110px; }
  .lib-actions { margin-top: 12px; }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .lr { grid-template-columns: 24px 44px minmax(0, 1fr) auto; grid-template-areas: "grip art title act"; column-gap: 10px; padding-right: 2px; }
  .lr-n, .lr-bpm, .lr-key, .lr-time { display: none; }
  .lr-t .m { display: flex; }
  .lr-act [data-move] { display: none; }
  .dc-res { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .dc-res-m { display: none; }
  .dc-res .btn { min-width: 0; }
  .lib-chart { grid-template-columns: 52px minmax(0, 1fr); }
  .lib-chart-img { width: 52px; height: 52px; }
  .lib-chart .acts { grid-column: 1 / -1; justify-content: flex-start; }
}
@container stage (max-width: 420px) {
  .lib-head { grid-template-columns: minmax(0, 1fr); }
  .lib-art { width: 150px; }
  .tp-facts dd { font-size: 13px; }
}
.cm-composer.is-guest .cm-av { background: var(--raised); color: var(--text-3); }
.dc-res .c-art { grid-area: auto; }
.cm-thread.is-hidden .cm { opacity: .5; }
.lr.is-current, .dc-res.is-current { background: var(--sel); }
.lr.is-current + .lr { box-shadow: none; }
