:root {
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bg: #0f1110;
  --panel: #171a19;
  --panel-2: #1f2321;
  --line: #2a2f2c;
  --text: #e9ece9;
  --muted: #8d958f;
  --accent: #7ddc8f;
  --accent-ink: #0c1a10;
  --warn: #f0b85a;
  --danger: #ef6b6b;
  --wave: #8b928d;
  --wave-hover: #c4cac5;
  --wave-played: #7ddc8f;
  --radius: 12px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6f4; --panel: #ffffff; --panel-2: #f0f2ef; --line: #e1e5e0;
    --text: #151816; --muted: #69716b; --accent: #1f9e46; --accent-ink: #ffffff;
    --wave: #9aa39c; --wave-hover: #5f6962; --wave-played: #1f9e46;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 80px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.hidden, [hidden] { display: none !important; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 16px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.brand::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; width: 100%;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
label.field { display: block; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

/* ---------- sign in / sign up ---------- */
.auth { max-width: 380px; margin: 60px auto; display: grid; gap: 12px; }
.auth h2, .auth p { margin: 0; }
.auth .btn.primary { width: 100%; margin-top: 4px; }
.auth-err { color: var(--danger); }
.auth-err:empty { display: none; }

/* ---------- player ---------- */
.player-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.play {
  width: 52px; height: 52px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
}
.play svg { width: 22px; height: 22px; pointer-events: none; }
.wave { position: relative; height: 96px; margin-bottom: 26px; user-select: none; }
.wave canvas { width: 100%; height: 100%; display: block; cursor: pointer; }
.wave-hover {
  position: absolute; top: -22px; transform: translateX(-50%); font-size: 11px; font-variant-numeric: tabular-nums;
  background: var(--panel-2); border: 1px solid var(--line); padding: 0 6px; border-radius: 4px; pointer-events: none;
}
.wave-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.wave-markers { position: absolute; left: 0; right: 0; bottom: -24px; height: 20px; }
.marker {
  position: absolute; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--panel); background: var(--warn); color: #1b1300; font-size: 10px; font-weight: 700;
  padding: 0; cursor: pointer; line-height: 16px;
}
.marker.admin { background: var(--accent); color: var(--accent-ink); }
.marker.resolved { opacity: .35; }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.versions { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 3px 12px; font-size: 13px; cursor: pointer;
}
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- tracklist ---------- */
.tracks { list-style: none; margin: 0; padding: 0; }
.tracks li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer;
}
.tracks li:hover { background: var(--panel-2); }
.tracks li.on { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.tracks .num { width: 20px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.badge.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- comments ---------- */
.composer { display: flex; flex-direction: column; gap: 8px; }
.composer .stamp {
  font-variant-numeric: tabular-nums; font-size: 13px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 10px; cursor: pointer;
}
.composer .stamp.off { text-decoration: line-through; color: var(--muted); }
.comments { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.comment { display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 8px; }
.comment:hover { background: var(--panel-2); }
.comment.flash { background: color-mix(in srgb, var(--warn) 18%, transparent); }
.comment.resolved .body { color: var(--muted); text-decoration: line-through; }
.comment .ts {
  flex: none; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--warn); background: none; border: 0;
  padding: 0; cursor: pointer; min-width: 44px; text-align: left;
}
.comment.admin .ts { color: var(--accent); }
.comment .who { font-weight: 600; font-size: 14px; line-height: 22px; }
.comment .who .muted { font-weight: 400; margin-left: 4px; }
.comment .body { white-space: pre-wrap; word-wrap: break-word; }
.comment .actions { display: flex; gap: 4px; flex: none; align-items: flex-start; }

/* ---------- payment ---------- */
.pay {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
}
.pay .amount { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
#download { display: inline-flex; align-items: center; gap: 6px; }
#download svg, .unlock-hint svg { width: 14px; height: 14px; flex: none; }
.unlock-hint { display: flex; align-items: center; gap: 6px; margin-top: 2px; }

/* Paid and downloadable: the files, handed over. */
.pay.ready { display: block; padding: 22px; background: color-mix(in srgb, var(--accent) 11%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.ready-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ready-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.ready-check { position: relative; width: 44px; height: 44px; flex: none; }
.ready-check svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ready-check circle { fill: var(--accent); stroke: none; }
.ready-check path { stroke: var(--accent-ink); stroke-width: 4.5; stroke-dasharray: 36; stroke-dashoffset: 0; }
.ready-check i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
  background: var(--accent); opacity: 0; }
.ready-files { display: grid; gap: 8px; }
.ready-file { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--text);
  text-decoration: none; background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  transition: transform .15s var(--ease), border-color .15s, box-shadow .15s; }
.ready-file:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 18%, transparent); }
.ready-file .grow { display: flex; flex-direction: column; min-width: 0; }
.ready-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ready-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); }
.ready-icon svg { width: 18px; height: 18px; }
.ready-go { font-weight: 600; color: var(--accent); font-size: 14px; }
@media (max-width: 520px) { .ready-go, #download span { display: none; } #download { padding: 6px 10px; } }

/* Just paid: the card lands, the check draws itself, a small burst, then one nudge on the first download. */
.pay.celebrate { animation: ready-in .55s var(--ease) both; }
.pay.celebrate .ready-check svg { animation: pop .5s .15s var(--ease) both; }
.pay.celebrate .ready-check path { stroke-dashoffset: 36; animation: draw .4s .45s ease-out forwards; }
.pay.celebrate .ready-check i { animation: burst .7s .5s ease-out both; }
.pay.celebrate .ready-file:first-child { animation: nudge .6s 1.05s var(--ease) both; }
@keyframes ready-in { from { opacity: 0; transform: translateY(8px) scale(.98); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  60% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(-34px) scale(.4); } }
@keyframes nudge { 0%, 100% { transform: none; } 40% { transform: translateY(-3px); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 25%, transparent); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 8px 16px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.3);
}

.layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .layout.two { grid-template-columns: 280px 1fr; align-items: start; } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); cursor: pointer;
}
.dropzone.over { border-color: var(--accent); color: var(--text); }
.progress { height: 4px; background: var(--panel-2); border-radius: 2px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 500; }
code.link { font-size: 12px; background: var(--panel-2); padding: 2px 6px; border-radius: 4px; word-break: break-all; }

@media (max-width: 600px) { .hint { display: none; } .wave { height: 72px; } }

/* A version switch is buffering: the old version keeps playing until the swap. */
.wave.switching canvas { opacity: .6; transition: opacity .15s; }

.tab { color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; font-size: 14px; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); background: var(--panel-2); }
@media (max-width: 760px) { .wide-only { display: none; } }

/* ---------- admin shell ---------- */
.shell.with-side { display: grid; min-height: 100vh; }
.shell:not(.with-side) .main { max-width: 960px; margin: 0 auto; padding: 24px 16px 80px; }
.shell.with-side .main { padding: 24px 32px 80px; min-width: 0; width: 100%; max-width: 1180px; justify-self: center; }
.side {
  border-right: 1px solid var(--line); padding: 18px 10px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel);
}
.side .brand { color: inherit; text-decoration: none; padding: 0 10px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.side-foot { display: flex; flex-direction: column; gap: 1px; border-top: 1px solid var(--line); padding-top: 10px; }
.side-link {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-size: 14px;
  color: var(--text); text-decoration: none; background: none; border: 0; cursor: pointer; text-align: left; width: 100%;
}
.side-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link:hover { background: var(--panel-2); }
.side-link.on { background: var(--panel-2); font-weight: 600; }
.side-link.muted { color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; color: var(--muted); }
.drop-target.over { outline: 2px solid var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.side-link.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.side-link.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 860px) {
  .shell.with-side { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .shell.with-side .main { padding: 20px 16px 80px; }
}

.list-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.crumbs { font-size: 15px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.crumbs a:hover { color: var(--text); }
.crumbs > :last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--muted); font-weight: 400 !important; }
.search { width: 220px !important; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--panel-2); }
tr.click a { color: var(--text); text-decoration: none; font-weight: 500; }
.list-panel { position: relative; min-height: 180px; border-radius: var(--radius); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- upload tray & naming dialog ---------- */
.tray { position: fixed; right: 16px; bottom: 16px; width: min(340px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.tray-row { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tray-row .progress { margin-top: 6px; }
.dlg {
  border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--text);
  width: min(560px, calc(100vw - 32px)); padding: 24px;
}
.dlg::backdrop { background: rgba(0,0,0,.55); }
.dlg .field { margin-top: 12px; }
.dlg .file-line { margin: 4px 0 4px; word-break: break-all; }
.dlg #matchRow { margin-top: 14px; }

/* ---------- player chrome ---------- */
.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.clock { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); white-space: nowrap; }
.player-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.player-foot .details { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border-radius: 8px; border: 0;
  background: none; color: var(--muted); cursor: pointer; flex: none;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.seg { display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; border-radius: 7px; padding: 4px 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--text); color: var(--bg); }
.seg button[hidden] { display: none; }

/* ---------- versions list ---------- */
.vlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.vrow:hover { background: var(--panel-2); }
.vrow.on { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.vrow .chip { flex: none; }
.star.on { color: var(--warn); }

/* ---------- alignment pass ---------- */
.comment .ts { line-height: 22px; }
.comment .actions { align-items: center; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.hint-line { margin: -4px 0 10px; }
.proj-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 16px 0; align-items: start; }
.proj-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.proj-main .panel + .panel { margin-top: 0; }
.tracks li { gap: 10px; padding: 9px 10px; }
.tracks li .badge { flex: none; }
.dropzone.slim { margin-top: 10px; padding: 12px 16px; border-width: 1.5px; font-size: 14px; }
.player-head h2 { overflow-wrap: anywhere; }
.player-foot { margin-top: 2px; }
.player-foot > .icon-btn:first-child { margin-left: -8px; }
.vrow { padding: 8px 10px; }
.vrow .icon-btn { margin: 0 -2px; }
#links td { vertical-align: middle; }
#links th:nth-child(3), #links th:nth-child(4) { width: 1%; white-space: nowrap; padding-right: 20px; }
.vlabel { font-weight: 600; font-size: 14px; }
.vrow.on .vlabel { color: var(--accent); }

@media (min-width: 960px) { .proj-grid { grid-template-columns: 300px minmax(0, 1fr); } }
.tracks li .badge { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracks li .grow { min-width: 0; }

/* Whole-panel drop targets */
.drop-panel { position: relative; }
.drop-veil { display: none; }
.drop-panel.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.drop-panel.over .drop-veil {
  display: grid; place-items: center; position: absolute; inset: 0; border-radius: var(--radius); z-index: 5;
  background: color-mix(in srgb, var(--panel) 85%, transparent); font-weight: 600; color: var(--accent); pointer-events: none;
}
#trackDrop { text-align: center; line-height: 1.4; }

/* Collapsible sidebar: the column animates to 0 while the panel slides and fades out. */
.shell.with-side { grid-template-columns: 232px minmax(0, 1fr); transition: grid-template-columns .32s var(--ease); }
.shell.with-side.collapsed { grid-template-columns: 0px minmax(0, 1fr); }
.side {
  overflow: hidden; min-width: 0;
  transition: opacity .22s ease, transform .32s var(--ease), padding .32s var(--ease), border-color .32s ease, visibility 0s;
}
.side > * { min-width: 212px; }
.shell.collapsed .side {
  opacity: 0; transform: translateX(-24px); padding-left: 0; padding-right: 0; border-right-color: transparent; visibility: hidden;
  transition: opacity .18s ease, transform .32s var(--ease), padding .32s var(--ease), border-color .32s ease, visibility 0s .32s;
}
.side-toggle { position: fixed; top: 14px; left: 188px; z-index: 30; transition: left .32s var(--ease), background .15s, color .15s; }
.shell.collapsed .side-toggle { left: 12px; }
.shell.with-side .main { transition: padding .32s var(--ease); }
.shell.with-side.collapsed .main { padding-left: 64px; }
@media (max-width: 860px) {
  .side-toggle { left: auto; right: 12px; }
  .shell.collapsed .side-toggle { left: auto; right: 12px; }
  .shell.with-side.collapsed .main { padding-left: 16px; padding-top: 56px; }
  .shell.with-side, .shell.with-side.collapsed { grid-template-columns: 1fr; }
  .shell.collapsed .side { display: none; }
}

/* In-place rename & in-app dialogs */
.inline-edit {
  font: inherit; color: inherit; background: var(--panel-2); border: 1px solid var(--accent);
  border-radius: 6px; padding: 2px 8px; margin: -3px -9px; width: calc(100% + 18px); min-width: 120px; outline: none;
}
.side-link .inline-edit { margin: -3px 0; width: 100%; }
.crumbs .inline-edit { width: 220px; margin: -3px 0; }
.dlg-sm { width: min(420px, calc(100vw - 32px)); }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger-fill:hover { filter: brightness(1.08); }

/* ---------- motion ---------- */
.btn, .chip, .icon-btn, .side-link, .seg button, .stamp, .tab {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s ease, filter .15s ease, box-shadow .15s ease;
}
.btn:active:not(:disabled), .chip:active, .icon-btn:active, .seg button:active, .stamp:active { transform: scale(.96); }
.play { transition: transform .15s var(--ease), filter .15s ease; }
.play:hover { filter: brightness(1.06); }
.play:active { transform: scale(.92); }
.play svg { transition: transform .2s var(--ease); }
.tracks li, .vrow, tr.click td, .comment, .side-link { transition: background-color .15s ease, box-shadow .2s ease, opacity .2s ease; }
.marker { transition: transform .15s var(--ease), opacity .2s ease; }
.marker:hover { transform: translateX(-50%) scale(1.2); }
.wave canvas { transition: opacity .2s ease; }
.drop-panel { transition: outline-color .15s ease; }
.drop-panel.over .drop-veil { animation: fade-in .15s ease; }
.dropzone { transition: border-color .15s ease, color .15s ease, background-color .15s ease; }

/* Views ease in when you navigate */
.view-in { animation: view-in .26s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* Dialogs */
.dlg[open] { animation: dlg-in .22s var(--ease); }
.dlg[open]::backdrop { animation: fade-in .22s ease; }
.dlg.closing { animation: dlg-out .14s ease forwards; }
.dlg.closing::backdrop { animation: fade-out .14s ease forwards; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes dlg-out { to { opacity: 0; transform: translateY(4px) scale(.98); } }

/* Toasts & upload tray */
.toast { animation: toast-in .28s var(--ease); }
.toast.out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 6px); } }
.tray-row { animation: rise-in .26s var(--ease); }
.tray-row.out { animation: fade-out .2s ease forwards; }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }

/* New comments and rows slide in */
.enter { animation: item-in .32s var(--ease) both; }
@keyframes item-in { from { opacity: 0; transform: translateY(-6px); } }

/* Reordering: the dragged row becomes a placeholder; the others glide (see flip() in admin). */
.vrow.dragging, .tracks li.dragging {
  opacity: 1; background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent);
  border-radius: 8px;
}
.vrow.dragging > *, .tracks li.dragging > * { opacity: .35; }
.vrow[draggable="true"], .tracks li[draggable="true"] { cursor: grab; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation-duration: .001ms !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
.vlist, .tracks { position: relative; }

/* Branding */
.brand.has-logo::before { display: none; }
.brand-logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; border-radius: 6px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-foot { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.share-foot a { color: var(--muted); }
.share-foot a:hover { color: var(--text); }
.brand-preview { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px dashed var(--line); border-radius: 12px; }
.logo-slot {
  width: 88px; height: 88px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2);
  display: grid; place-items: center; overflow: hidden; flex: none; cursor: pointer; transition: border-color .15s ease;
}
.logo-slot:hover { border-color: var(--muted); }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .12s ease, border-color .15s ease; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: var(--text); }
input[type=color] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }

/* Share links table */
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }
#links td { padding-top: 10px; padding-bottom: 10px; }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-name { font-weight: 500; min-width: 0; }
.pill-select { position: relative; display: inline-flex; flex: none; }
.pill-select select {
  -webkit-appearance: none; appearance: none; width: auto; cursor: pointer;
  padding: 4px 28px 4px 12px; border-radius: 999px; font-size: 13px; line-height: 20px;
  background: var(--panel-2); border: 1px solid var(--line); transition: border-color .15s ease;
}
.pill-select select:hover { border-color: var(--muted); }
.pill-select::after {
  content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; pointer-events: none;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg);
}
.cell-check { display: flex; align-items: center; gap: 8px; min-height: 28px; white-space: nowrap; }
.cell-check .badge { display: inline-flex; align-items: center; height: 20px; line-height: 1; padding: 0 8px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.who-cell .pill-select select { min-width: 124px; }
.side .brand { padding-right: 44px; min-width: 0; }

/* Artist filter */
.artist-filter select { min-width: 140px; max-width: 220px; text-overflow: ellipsis; }
.artist-filter.on select { border-color: var(--accent); color: var(--accent); }
.artist-filter.on::after { border-color: var(--accent); }
.artist-link { color: inherit !important; font-weight: 400 !important; text-decoration: none; }
.artist-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.search { padding: 6px 12px !important; border-radius: 999px !important; font-size: 14px; }
.crumbs { white-space: nowrap; }

/* ---------- billing & Stripe ---------- */
.banner { background: color-mix(in srgb, var(--warn, #f5c542) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn, #f5c542) 40%, transparent);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.banner a { color: inherit; font-weight: 600; }
.stripe-connect { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.stripe-connect .grow { min-width: 200px; }
.trial-list { margin: 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- storage ---------- */
.meter { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 2px 0 14px; }
.meter > div { height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s var(--ease); }
.meter.warn > div { background: var(--warn); }
.meter.full > div { background: var(--danger); }
.storage-projects { width: 100%; }

/* ---------- the shelf (project list) ---------- */
:root { --serif: "Instrument Serif", ui-serif, Georgia, serif; --vinyl: #0c0d0d; }
.list-head .crumbs { font-family: var(--serif); font-size: 34px; line-height: 1.1; letter-spacing: -0.01em; }
.list-head .crumbs > :last-child { font-weight: 400; }
.list-head .crumbs a { padding: 0 2px; }
.list-head .crumbs .sep { font-style: italic; opacity: .5; }

.shelf-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -6px 0 22px; font-size: 14px; color: var(--muted); }
.shelf-summary:empty { display: none; }
.shelf-summary span, .shelf-summary button { display: inline-flex; align-items: center; gap: 6px; }
.shelf-summary button { all: unset; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.shelf-summary button:hover, .shelf-summary button.ctx-on { color: var(--text); text-decoration-color: currentColor; }
.shelf-summary button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.shelf-summary span::before, .shelf-summary button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.shelf-summary b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.shelf-summary .due::before { background: var(--warn); }
.shelf-summary .paid::before { background: var(--accent); }
.shelf-summary .notes::before { background: var(--text); }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 22px 18px; align-items: start; }

/* A record: the project's waveform around a circle. The color says where the money is. */
.paid { --disc: var(--accent); }
.due { --disc: var(--warn); }
.none { --disc: var(--wave-hover); }
.disc { display: block; width: 100%; height: auto; overflow: visible; }
.disc-body { fill: var(--vinyl); }
.disc-groove { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: .6; }
.disc-bars { fill: none; stroke: var(--disc); stroke-width: 1.7; stroke-linecap: round; }
.disc-label { fill: var(--disc); }
.disc-hole { fill: var(--vinyl); }

.sleeve, .crate { cursor: pointer; position: relative; border-radius: 16px; outline-offset: 3px;
  animation: shelf-in .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.sleeve-art {
  position: relative; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--disc) 22%, transparent), transparent 60%),
    linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 30px -18px rgba(0, 0, 0, .8);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s;
}
/* A little sheen, like light on a sleeve. */
.sleeve-art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 38%); }
.sleeve-art .disc { width: 84%; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .45)); will-change: transform; } /* spun by spinOnHover() */
.sleeve:hover .sleeve-art { transform: translateY(-4px); border-color: color-mix(in srgb, var(--disc) 45%, var(--line));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 22px 40px -20px color-mix(in srgb, var(--disc) 45%, rgba(0, 0, 0, .9)); }
.notes-dot { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--text); color: var(--bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35); border: 0; cursor: pointer; z-index: 2; }
.notes-dot:hover { transform: scale(1.08); }

.sleeve-meta { padding: 12px 4px 0; display: grid; gap: 2px; min-width: 0; }
.sleeve-title { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sleeve-artist { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sleeve-artist a { color: var(--muted); text-decoration: none; }
.sleeve-artist a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.sleeve-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; flex-wrap: wrap; }
.sleeve-where { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); margin-top: 2px; min-width: 0; }
.sleeve-where .ico { width: 13px; height: 13px; flex: none; }
.sleeve-where span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-s { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .01em;
  color: var(--disc); background: color-mix(in srgb, var(--disc) 14%, transparent); }

/* A folder is a crate: its records stand in it behind the front panel, and rise on hover. */
.crate-art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, .05), transparent 70%), linear-gradient(180deg, var(--panel), var(--bg));
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, .8); transition: transform .35s var(--ease), border-color .2s; }
.crate-records { position: absolute; inset: 0; }
.crate-disc { position: absolute; width: 64%; bottom: 22%;
  left: calc(17% + (var(--k) - (var(--n) - 1) / 2) * 21%);
  transform: rotate(calc((var(--k) - (var(--n) - 1) / 2) * 10deg)); transform-origin: 50% 100%;
  transition: transform .45s var(--ease); transition-delay: calc(var(--k) * 50ms); }
.crate-disc .disc { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .55)); }
.crate-front { position: absolute; left: 0; right: 0; bottom: 0; height: 40%; display: flex; align-items: flex-end; padding: 12px 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-2) 96%, white 4%), var(--panel));
  border-top: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 -10px 24px -8px rgba(0, 0, 0, .6); }
.crate-front .ico { width: 18px; height: 18px; color: var(--muted); }
.crate-empty { position: absolute; top: 30%; left: 0; right: 0; text-align: center; font-family: var(--serif); font-style: italic;
  font-size: 20px; color: var(--muted); opacity: .7; }
.crate:hover .crate-art { transform: translateY(-4px); border-color: var(--muted); }
.crate:hover .crate-disc { transform: translateY(-16%) rotate(calc((var(--k) - (var(--n) - 1) / 2) * 14deg)); }
.crate.drop-target.over { outline: none; background: none; }
.crate.drop-target.over .crate-art { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.crate.drop-target.over .crate-disc { transform: translateY(-20%) rotate(calc((var(--k) - (var(--n) - 1) / 2) * 16deg)); }

.shelf-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 40px 28px; text-align: center; min-height: max(320px, calc(100vh - 280px));
  border: 1px dashed var(--line); border-radius: 16px; }
.shelf-empty .muted { max-width: 440px; margin: 0 auto; }
.shelf-empty .disc { width: 120px; flex: none; --disc: var(--line); animation: spin 14s linear infinite; }
.shelf-empty strong { font-family: var(--serif); font-weight: 400; font-size: 24px; display: block; margin-bottom: 2px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shelf-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .sleeve, .crate { animation: none; }
  .shelf-empty .disc { animation: none; }
}
@media (max-width: 560px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .list-head .crumbs { font-size: 28px; flex-basis: 100%; }
}

/* ---------- owner & promo codes ---------- */
.table-scroll { overflow-x: auto; }
.code-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 14px; }
.code-grid [hidden] { display: none !important; }
.code-pill { font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; padding: 6px 10px;
  border-radius: 8px; border: 1px dashed var(--line); background: var(--panel-2); color: var(--text); cursor: copy; }
.code-pill:hover { border-color: var(--accent); }
.promo { margin-top: 12px; }
.promo form { margin-top: 6px; max-width: 360px; }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.linkish:hover { color: var(--text); }

/* ---------- drop audio anywhere on the project list ---------- */
.page-drop { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; padding: 16px; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(3px); animation: fade-in .15s ease; }
.page-drop-box { height: 100%; border: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 22px;
  display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px;
  background: radial-gradient(60% 50% at 50% 45%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.page-drop-box .disc { width: 120px; --disc: var(--accent); animation: spin 5s linear infinite, pop .35s var(--ease) both; }
.page-drop-title { font-family: var(--serif); font-size: 34px; line-height: 1.15; margin-top: 8px; }
.page-drop-title em { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .page-drop-box .disc { animation: none; } }

/* ---------- favorites ---------- */
.side-section { margin-top: 18px; }
.side-head { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; cursor: pointer;
  padding: 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.side-head:hover { color: var(--text); }
.side-head .chev { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.side-head[aria-expanded="false"] .chev { transform: rotate(-90deg); }
.side-empty { padding: 4px 12px 4px 30px; font-size: 13px; color: var(--muted); opacity: .75; }
.fav-disc { width: 18px; height: 18px; flex: none; display: inline-grid; }
.fav-disc .disc-bars { stroke-width: 3; }
.side-link.fav .ico { width: 16px; height: 16px; }

.star-btn { position: absolute; top: 10px; left: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 0;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(.85); transition: opacity .15s, transform .2s var(--ease), color .15s; }
.star-btn svg { width: 16px; height: 16px; }
.sleeve:hover .star-btn, .crate:hover .star-btn, .star-btn:focus-visible, .star-btn.on { opacity: 1; transform: none; }
.star-btn.on, .star-toggle.on { color: #f5c542; }
.star-btn:hover { transform: scale(1.08); }
.title-row { display: flex; align-items: center; gap: 8px; }
.star-toggle svg { width: 18px; height: 18px; }
#starFolder svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (hover: none) { .star-btn { opacity: 1; transform: none; } }

/* ---------- help menu ---------- */
.side-help { position: relative; margin-top: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.help-btn { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted);
  font-weight: 700; font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.help-btn:hover, .help-btn[aria-expanded="true"] { color: var(--text); border-color: var(--muted); }
.help-menu { position: fixed; z-index: 60; width: 250px; padding: 6px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); animation: dlg-in .18s var(--ease); }
.help-menu button, .help-menu a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text); font-size: 14.5px; text-decoration: none; cursor: pointer; text-align: left; }
.help-menu button:hover, .help-menu a:hover { background: var(--panel-2); }
.help-menu svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.help-menu .ext { width: 14px; height: 14px; margin-left: auto; }
.help-menu kbd { margin-left: auto; }
.help-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
kbd { font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 4px 7px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--panel-2); color: var(--text); }

.help-dlg { width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); overflow: auto; }
.help-title { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps p { margin: 4px 0 0; font-size: 14px; }
.step-disc { position: relative; width: 40px; flex: none; --disc: var(--accent); }
.step-disc b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--accent-ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 2px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 8px 0 0; font-size: 14px; }
.keys { width: 100%; }
.keys td { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.keys td:first-child { white-space: nowrap; width: 45%; }
#msgKind { flex-wrap: wrap; }

/* Welcome popup for invited studios */
.welcome-dlg { width: min(520px, calc(100vw - 32px)); max-height: min(88vh, 760px); overflow: auto; padding: 28px; }
.welcome-disc { width: 76px; margin-bottom: 14px; --disc: var(--accent); animation: spin 9s linear infinite; }
.welcome-dlg .help-title { margin: 0 0 10px; line-height: 1.1; }
.welcome-body p { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.welcome-tip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 6px 0 20px; padding: 12px 14px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--line); }
.welcome-tip .help-btn { cursor: default; color: var(--text); border-color: var(--accent); }
.welcome-arrow { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.welcome-tip-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; background: var(--panel);
  border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.welcome-tip-item svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.welcome-tip-where { flex-basis: 100%; }
@media (min-width: 521px) { .welcome-tip-where { flex-basis: auto; margin-left: auto; } }
.welcome-acts { justify-content: flex-end; }
@media (max-width: 420px) { .welcome-dlg { padding: 22px 18px; } .welcome-acts .btn { flex: 1; } }
/* After the welcome popup: the ? button calls for attention for a few seconds. */
.help-btn.pulse { color: var(--text); border-color: var(--accent); animation: help-pulse 1.4s ease-out 5; }
@keyframes help-pulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  to { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .welcome-disc, .help-btn.pulse { animation: none; } }

.invite-note { margin: -4px 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); }
.invite-note.bad { color: var(--danger); }
.invites { margin-top: 18px; }
.invites:empty { display: none; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.invite-row .grow { min-width: 0; flex: 1 1 180px; }
.invite-acts { display: flex; gap: 6px; margin-left: auto; }
.message { padding: 14px 0; border-bottom: 1px solid var(--line); }
.message:last-child { border-bottom: 0; }
.message.unread { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
.message-body { margin: 8px 0 0; white-space: pre-wrap; }

/* ---------- terms & privacy ---------- */
.legal { max-width: 720px; line-height: 1.65; }
.legal .brand { display: inline-flex; margin-bottom: 28px; color: var(--text); text-decoration: none; }
.legal h1 { font-family: var(--serif, Georgia, serif); font-weight: 400; font-size: 44px; margin-bottom: 4px; }
.legal h2 { font-size: 18px; margin: 32px 0 8px; }
.legal h3 { font-size: 15px; margin: 18px 0 4px; color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }

.legal-note { text-align: center; line-height: 1.5; }
.legal-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal-note a:hover { color: var(--text); }
.share-foot .foot-legal { opacity: .7; }

/* ---------- right-click menus ---------- */
.ctx-menu { width: auto; min-width: 214px; max-width: 290px; }
.ctx-menu button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Two-line rows (the unresolved-notes list): the note, clipped to two lines, then where it is. */
.ctx-menu.wide { max-width: min(360px, calc(100vw - 16px)); }
.ctx-menu button.rich { align-items: flex-start; }
.ctx-menu button.rich svg { margin-top: 2px; }
.ctx-menu button.rich span { white-space: normal; display: grid; gap: 2px; overflow-wrap: anywhere; }
.ctx-menu button.rich .l { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.ctx-menu button.rich small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctx-menu button:focus-visible { outline: none; background: var(--panel-2); }
.ctx-menu button.danger, .ctx-menu button.danger svg { color: var(--danger); }
.sleeve.ctx-on .sleeve-art, .crate.ctx-on .crate-art { border-color: var(--muted); }
.side-link.ctx-on, #tracks li.ctx-on, .vrow.ctx-on, .comment.ctx-on, #links tr.ctx-on > td { background: var(--panel-2); }

/* ---------- artwork ---------- */
/* The sleeve (or crate) behind a record takes on the artwork's colors. */
.has-art::before { content: ""; position: absolute; inset: -25%; pointer-events: none;
  background: var(--art) center / cover; filter: blur(26px) saturate(1.35); opacity: .5; }
.sleeve-art .disc { position: relative; z-index: 1; }
.crate-label { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; display: block;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .1); }
.sleeve.art-over .sleeve-art, .crate.art-over .crate-art, .art-slot.art-over {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); transform: translateY(-4px) scale(1.02); }
.art-slot { width: 64px; height: 64px; flex: none; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); display: grid; place-items: center;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8); transition: border-color .2s, color .2s, transform .25s var(--ease), box-shadow .25s; }
.art-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-slot.empty { border-style: dashed; box-shadow: none; align-content: center; gap: 2px; font-size: 11px; }
.art-slot.empty svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art-slot:hover { border-color: var(--muted); color: var(--text); }
.proj-head { align-items: center; gap: 16px; }

/* ---------- quick play on the shelf ---------- */
.qp { position: absolute; left: 50%; top: 50%; z-index: 3; width: 25%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff;
  background: rgba(10, 11, 11, .55); backdrop-filter: blur(8px) saturate(1.4); -webkit-backdrop-filter: blur(8px) saturate(1.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .14);
  opacity: 0; transform: translate(-50%, -50%) scale(.82); transition: opacity .18s, transform .25s var(--ease), background .15s; }
.qp svg { width: 42%; height: 42%; }
.qp svg path[d^="M8"] { transform: translateX(6%); } /* the play triangle, optically centered */
.sleeve:hover .qp, .qp:focus-visible, .previewing .qp { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.qp:hover { background: rgba(10, 11, 11, .75); transform: translate(-50%, -50%) scale(1.07); }
/* While a preview plays, a thin ring around the button fills up with the song. */
.qp::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; opacity: 0; transition: opacity .25s;
  background: conic-gradient(var(--disc) calc(var(--p, 0) * 1turn), rgba(255, 255, 255, .16) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); }
.previewing .qp::before { opacity: 1; }
.previewing .sleeve-art { border-color: color-mix(in srgb, var(--disc) 55%, var(--line)); }
.previewing .notes-dot { opacity: 0; }
.notes-dot { transition: opacity .2s; }
.star-btn { z-index: 3; }
/* The tonearm swings onto the record, then creeps toward the label as the song plays. */
.tonearm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: visible;
  opacity: 0; transition: opacity .3s; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .5)); }
.previewing .tonearm { opacity: 1; }
.tonearm .arm { transform-box: view-box; transform-origin: 90px 10px; transform: rotate(var(--arm, 62deg)); transition: transform .7s var(--ease); }
.tracking .tonearm .arm { transition: transform .3s linear; }
.arm-tube { stroke: #d5d9d6; stroke-width: 1.5; stroke-linecap: round; }
.arm-head { fill: #eef0ee; }
.arm-weight { fill: #8f9691; }
.arm-base { fill: #262a28; stroke: rgba(255, 255, 255, .2); stroke-width: .6; }
.arm-cap { fill: #d5d9d6; }
@media (hover: none) { .qp { opacity: .9; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .tonearm .arm, .tracking .tonearm .arm { transition: none; } }

/* What the client did last, under a record. */
.sleeve-seen { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 3px; }
.sleeve-seen::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.sleeve-seen.listen::before, .sleeve-seen.download::before, .sleeve-seen.paid::before { background: var(--accent); }

/* ---------- link activity ---------- */
#links tr.revoked > td { opacity: .45; }
.act-cell { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 4px 8px; margin: -4px -8px;
  border-radius: 8px; cursor: pointer; color: var(--text); font-size: 13px; white-space: nowrap; }
.act-cell:hover { background: var(--panel-2); }
.act-cell.none { color: var(--muted); }
.act-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.act-cell.none .act-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.act-cell.recent .act-dot { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.act-cell .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .2s var(--ease); }
.act-cell.open .chev { transform: rotate(180deg); }
#links tr.activity-row > td { padding: 0 0 14px; border-top: 0; }
.timeline { background: var(--panel-2); border-radius: 12px; padding: 14px 16px; animation: fade-in .2s ease; }
.timeline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { display: flex; gap: 12px; position: relative; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: -12px; width: 1px; background: var(--line); }
.tl-icon { width: 27px; height: 27px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; flex: none; }
.tl-icon svg { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-line { display: flex; gap: 12px; align-items: baseline; font-size: 14px; padding-top: 3px; }
.tl-line strong { font-weight: 600; }
.tl-line time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.tl-play { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 90px; align-items: center; gap: 8px; font-size: 13px; margin-top: 7px; }
.tl-play > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-play svg { width: 11px; height: 11px; fill: var(--accent); stroke: none; }
.tl-dur { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-bar { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.tl-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.tl-quote { margin-top: 4px; padding-left: 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13px; white-space: pre-wrap; }
@media (max-width: 560px) {
  .tl-line { flex-direction: column; gap: 0; }
  .tl-play { grid-template-columns: 12px minmax(0, 1fr) auto; }
  .tl-bar { display: none; }
}

/* ---------- client page: artwork and the studio's note ---------- */
.share-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.share-art { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .75); }
.client-note { margin: -6px 0 20px; padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line)); border-left: 3px solid var(--accent); }
.client-note-from { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--accent); margin-bottom: 3px; }
.client-note p { margin: 0; white-space: pre-wrap; font-size: 15px; line-height: 1.55; color: var(--text); }
@media (max-width: 520px) { .share-art { width: 64px; height: 64px; } }

/* ---------- share links on phones: each link is a small card instead of a table row ---------- */
.m-label { display: none; }
@media (max-width: 640px) {
  .new-link select, .new-link input[type="text"] { flex: 1 1 140px; }
  .new-link .btn.primary { flex: 1 1 100%; }
  #links, #links tbody { display: block; }
  #links tr.link-head { display: none; }
  #links tr.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  #links tr.link-row > td { display: block; padding: 0; border: 0; }
  #links tr.link-row > .wide-only { display: none; }
  #links tr.link-row > td:first-child { flex: 0 1 auto; min-width: 0; }
  #links tr.link-row > .act-td { flex: 1 1 auto; display: flex; justify-content: flex-end; }
  #links .act-cell { margin: 0 -8px 0 0; }
  #links .perm-td .cell-check { cursor: pointer; font-size: 14px; }
  .m-label { display: inline; }
  #links tr.link-row > .actions-td { flex: 1 1 100%; }
  #links .cell-actions { justify-content: flex-start; flex-wrap: nowrap; }
  #links .cell-actions .btn { flex: 1; }
  #links tr.activity-row { display: block; }
  #links tr.activity-row > td { display: block; padding: 0 0 14px; }
  #links tr.link-row:has(+ .activity-row), #links tr.link-row:last-child { border-bottom: 0; }
  #links td.muted { display: block; border: 0; padding: 4px 0; }
}

/* The public demo link: a thin bar over the client page. */
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 9px 16px;
  background: var(--panel-2); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: center; }
.demo-banner strong { color: var(--text); font-weight: 600; }
.demo-banner a { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }
.demo-try { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--text); cursor: pointer;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); text-underline-offset: 3px; }
.demo-try:hover { text-decoration-color: var(--text); }

/* "Try your branding" on the demo link: a pill in the corner that opens a small floating panel. */
.try-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
  background: color-mix(in srgb, var(--panel) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); transition: transform .25s var(--ease), border-color .2s; animation: fab-in .6s 1.2s var(--ease) both; }
.try-fab:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.try-fab.on { border-color: var(--accent); }
.try-fab-dots { display: flex; }
.try-fab-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--panel); margin-left: -4px; transition: background .3s; }
.try-fab-dots i:first-child { margin-left: 0; background: var(--accent); }
.try-fab-dots i:nth-child(2) { background: #9b8cff; }
.try-fab-dots i:nth-child(3) { background: #ff6b5a; }
@keyframes fab-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
body:has(.try-fab) .share-foot { padding-bottom: 72px; }

.try-brand { position: fixed; right: 20px; bottom: 76px; z-index: 41; width: 320px; max-height: calc(100vh - 100px); overflow: auto;
  padding: 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .75); opacity: 0; transform: translateY(10px) scale(.98); transform-origin: bottom right;
  transition: opacity .22s var(--ease), transform .28s var(--ease); }
.try-brand.in { opacity: 1; transform: none; }
.tb-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tb-head > div { flex: 1; }
.tb-title { font-family: var(--serif, Georgia, serif); font-size: 24px; line-height: 1.1; letter-spacing: -.01em; }
.tb-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.tb-x { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 12px; flex: none; }
.tb-x:hover { color: var(--text); }
.tb-field { display: block; margin-top: 12px; }
.tb-field > span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tb-field input[type=text], .tb-field input[type=url] { width: 100%; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.tb-logo { position: relative; }
.tb-drop { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line);
  background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-align: left; transition: border-color .2s, background .2s; }
.tb-drop:hover, .tb-drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tb-drop u { color: var(--text); text-underline-offset: 2px; }
.tb-drop-img { width: 40px; height: 40px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--panel-2); overflow: hidden; }
.tb-drop-img:empty::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.tb-drop-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tb-drop.has { border-style: solid; }
.tb-clear { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: var(--panel-2); color: var(--muted); cursor: pointer; font-size: 11px; }
.tb-clear:hover { color: var(--text); }
.tb-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-sw { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .15s var(--ease); }
.tb-sw:hover { transform: scale(1.1); }
.tb-sw.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.tb-custom { background: conic-gradient(from 90deg, #ff5f5f, #ffd23f, #7ddc8f, #5cc8ff, #9b8cff, #ff5fa2, #ff5f5f); }
.tb-custom.on { background: var(--c); }
.tb-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }
.tb-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.tb-note { flex: 1; font-size: 12px; color: var(--muted); }
.tb-reset { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tb-reset:hover { color: var(--text); }
/* Phones: the panel is a sheet across the bottom. */
@media (max-width: 560px) {
  .try-fab { right: 50%; transform: translateX(50%); bottom: 16px; }
  .try-fab:hover { transform: translateX(50%) translateY(-2px); }
  .try-brand { left: 10px; right: 10px; bottom: 70px; width: auto; transform-origin: bottom center; }
}
@media (prefers-reduced-motion: reduce) { .try-fab, .try-brand { animation: none; transition: none; } }

/* ---------- turnaround: "Mix due Oct 4" ---------- */
.due-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 2px 10px 2px 8px; border-radius: 999px;
  font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); }
.due-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.due-line.soon::before { background: var(--warn); }
.due-line.late { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.due-line.late::before { background: var(--danger); }
button.due-line { cursor: pointer; }
button.due-line:hover { border-color: var(--muted); }
.chip-s.when { --disc: var(--muted); }
.chip-s.when.soon { --disc: var(--warn); }
.chip-s.when.late { --disc: var(--danger); }

/* ---------- versions row: new versions, reference tracks ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.chip.new::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chip.ref { border-style: dashed; max-width: 220px; }
.chip.ref.on { border-style: solid; }
.ref-tag { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; padding: 0 5px; border-radius: 4px; flex: none;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.chip.ref.on .ref-tag { color: #1b1300; background: var(--warn); }
.chip.add-ref { color: var(--muted); border-color: transparent; padding-left: 8px; }
.chip.add-ref:hover { color: var(--text); border-color: var(--line); }
.chip.add-ref svg { width: 13px; height: 13px; }
.chip.add-ref:disabled { cursor: progress; }

/* What changed in the version playing (or which reference is), under the player. */
.changes { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--panel-2); border-left: 3px solid var(--accent); }
.changes:has(.ref-tag) { border-left-color: var(--warn); }
.changes-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.changes p { margin: 3px 0 0; white-space: pre-wrap; }
.changes .btn { margin-top: 8px; }
.new-note { margin: -4px 0 14px; font-size: 13px; font-weight: 600; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.new-note::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.vchanges { display: block; max-width: 100%; margin-top: 2px; padding: 0; border: 0; background: none; color: var(--text); font: inherit;
  font-size: 13px; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vchanges.empty { color: var(--muted); opacity: 0; transition: opacity .15s; }
.vrow:hover .vchanges.empty, .vrow.on .vchanges.empty, .vchanges:focus-visible { opacity: 1; }
@media (hover: none) { .vchanges.empty { opacity: 1; } }
.vchanges:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- voice notes ---------- */
.rec-btn { display: inline-flex; align-items: center; gap: 6px; }
.rec-btn svg { width: 15px; height: 15px; }
.rec-btn.rec { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); font-variant-numeric: tabular-nums; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); animation: rec-pulse 1s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .3; } }
.memo-draft { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.memo { --p: 0%; display: inline-flex; align-items: center; gap: 10px; margin: 2px 0 4px; padding: 5px 12px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; max-width: 100%; white-space: nowrap; }
.memo:hover { border-color: var(--muted); }
.memo-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); color: var(--accent-ink); }
.memo-ico svg { width: 14px; height: 14px; grid-area: 1 / 1; }
.memo-ico svg + svg, .memo.playing .memo-ico svg:first-child { display: none; }
.memo.playing .memo-ico svg + svg { display: block; }
.memo-bar { width: 90px; min-width: 36px; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; flex: 0 1 90px; }
.memo-bar i { display: block; height: 100%; width: var(--p); background: var(--accent); }
.memo-len { font-variant-numeric: tabular-nums; color: var(--muted); }
.memo-kind { display: flex; color: var(--muted); }
.memo-kind svg { width: 14px; height: 14px; }
.transcript { margin-top: 4px; font-size: 14px; color: var(--text); white-space: pre-wrap; word-wrap: break-word;
  padding-left: 10px; border-left: 2px solid var(--line); }
.transcript span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.comment .transcribe { margin-top: 4px; }
