:root {
  --bg: #121211;
  --bg-2: #171716;
  --surface: #1c1c1a;
  --surface-2: #242421;
  --line: #2d2d2a;
  --line-2: #3a3a36;
  --text: #ecebe5;
  --muted: #95938a;
  --faint: #6a6862;
  --accent: #ff6a3d;
  --accent-ink: #1a0f0a;
  --ok: #8fd18a;
  --err: #ff7b72;
  --yt: #ff4e45;
  --sc: #ff8a2a;
  --sp: #3ed37a;
  --radius: 14px;
  --radius-sm: 9px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- brand / top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 32px);
  padding-top: max(14px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__name { font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand--stacked { flex-direction: column; gap: 14px; }
.brand--stacked .brand__name { font-size: 22px; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px;
  text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .12s var(--ease), opacity .18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover:not(:disabled) { background: #ff7d55; }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn--block { width: 100%; }

.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__label { opacity: 0; }
.btn.is-loading .spinner { display: block; position: absolute; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 8px; border: 1px solid var(--line);
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--line-2); }

/* ---------- layout ---------- */
.shell {
  width: 100%; max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 8vh, 88px) clamp(16px, 4vw, 24px) 64px;
}

/* ---------- intake ---------- */
.intake__title {
  margin: 0 0 6px;
  font-size: clamp(30px, 5.5vw, 44px);
  font-weight: 680; letter-spacing: -0.035em; line-height: 1.05;
}
.intake__sub { margin: 0 0 26px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: 12.5px; color: var(--muted);
  padding: 3px 10px; border-radius: 99px;
  border: 1px solid var(--line);
  transition: color .2s, border-color .2s, background .2s;
}
.pill.is-on[data-p="youtube"] { color: var(--yt); border-color: color-mix(in srgb, var(--yt) 45%, transparent); }
.pill.is-on[data-p="soundcloud"] { color: var(--sc); border-color: color-mix(in srgb, var(--sc) 45%, transparent); }
.pill.is-on[data-p="spotify"] { color: var(--sp); border-color: color-mix(in srgb, var(--sp) 45%, transparent); }

.omnibox {
  display: flex; align-items: center; gap: 6px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.omnibox:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.omnibox input {
  flex: 1; min-width: 0;
  height: 44px; padding: 0 10px;
  background: transparent; border: 0; outline: none;
  font-family: var(--mono); font-size: 14px;
}
.omnibox input::placeholder { color: var(--faint); }
.omnibox__tag {
  display: none;
  margin-left: 6px;
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--muted);
  animation: pop .25s var(--ease);
}
.omnibox__tag.is-on { display: inline-block; }
.omnibox__tag[data-p="youtube"] { color: var(--yt); }
.omnibox__tag[data-p="soundcloud"] { color: var(--sc); }
.omnibox__tag[data-p="spotify"] { color: var(--sp); }
.omnibox__paste {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--faint); cursor: pointer;
  transition: color .15s, background .15s;
}
.omnibox__paste:hover { color: var(--text); background: var(--surface-2); }

.form-error { min-height: 22px; margin: 10px 2px 0; color: var(--err); font-size: 13.5px; }

/* ---------- preview ---------- */
.preview {
  display: grid; grid-template-columns: 220px 1fr; gap: 22px;
  margin-top: 10px; padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise .35s var(--ease);
}
.preview__media {
  position: relative; align-self: start;
  aspect-ratio: 16 / 10;
  border-radius: 10px; overflow: hidden;
  background: var(--surface-2);
}
.preview__media img { width: 100%; height: 100%; object-fit: cover; }
.preview__media.is-square { aspect-ratio: 1; }
.preview__duration {
  position: absolute; right: 8px; bottom: 8px;
  font: 600 12px var(--mono);
  padding: 2px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, .72);
}
.preview__duration:empty { display: none; }
.preview__body { min-width: 0; display: flex; flex-direction: column; }
.preview__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tag {
  font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
}
.tag[data-p="youtube"] { color: var(--yt); }
.tag[data-p="soundcloud"] { color: var(--sc); }
.tag[data-p="spotify"] { color: var(--sp); }
.preview__title {
  margin: 8px 0 2px;
  font-size: 19px; font-weight: 640; letter-spacing: -0.02em; line-height: 1.25;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.preview__author { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.preview__author:empty { display: none; }

.formats { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; }
.format { position: relative; flex: 1; max-width: 160px; }
.format input { position: absolute; opacity: 0; pointer-events: none; }
.format label {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px;
  border: 1px solid var(--line-2); border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.format label b { font-size: 14.5px; font-weight: 650; }
.format label small { color: var(--muted); font-size: 12px; }
.format label:hover { background: var(--surface-2); }
.format input:checked + label { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.format input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.format input:disabled + label { opacity: .4; cursor: not-allowed; background: transparent; }

.preview__reason { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.preview__reason:empty { display: none; }
.preview__actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.preview__notice { margin: 14px 0 0; font-size: 12.5px; color: var(--faint); }

/* ---------- origin + matches ---------- */
.origin {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 10px 0 0; font-size: 12.5px; color: var(--muted);
}
.origin b { font-weight: 600; color: var(--text); }
.origin .tag { font-size: 10.5px; }

.matches { margin-top: 14px; animation: rise .3s var(--ease); }
.matches__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 8px; }
.matches__head h2 { margin: 0; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.matches__status { font-size: 12.5px; color: var(--faint); }
.matches__status.is-loading::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; vertical-align: -1px;
  border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.matches__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.match {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px;
  width: 100%; padding: 8px; text-align: left;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.match:hover { background: var(--surface); }
.match.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.match img { width: 64px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.match__text { min-width: 0; }
.match__title { display: block; font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match__author { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match__dur { font: 12px var(--mono); color: var(--muted); }
.match__dur.is-close { color: var(--ok); }

.job__via { flex: none; font-size: 11px; color: var(--faint); }

/* ---------- history ---------- */
.history { margin-top: 56px; }
.history__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.history__head h2 { margin: 0; font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.history__note { font-size: 12.5px; color: var(--faint); text-align: right; }

.jobs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.jobs__empty { color: var(--faint); font-size: 14px; padding: 22px 0; margin: 0; }
.jobs:not(:empty) + .jobs__empty { display: none; }

.job {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  animation: rise .3s var(--ease);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.job.is-leaving { opacity: 0; transform: translateX(12px); }
.job__thumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.job__thumb img { width: 100%; height: 100%; object-fit: cover; }
.job__main { min-width: 0; }
.job__line { display: flex; align-items: center; gap: 8px; }
.job__title { font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.job__fmt {
  flex: none;
  font: 600 10.5px var(--mono);
  padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.job__status { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.job__pct { font-family: var(--mono); }
.job[data-status="error"] .job__status { color: var(--err); }
.job[data-status="done"] .job__stage { color: var(--ok); }
.job__actions { display: flex; align-items: center; gap: 6px; }
.job__dl { display: none; }
.job[data-status="done"] .job__dl { display: inline-flex; }

.bar { height: 3px; margin-top: 8px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .5s var(--ease); }
.job[data-status="done"] .bar, .job[data-status="error"] .bar { display: none; }
.bar.is-indeterminate .bar__fill { width: 35% !important; animation: slide 1.1s var(--ease) infinite; }
.job[data-status="queued"] .bar__fill { width: 0; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 550;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  max-width: calc(100vw - 32px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--err); color: #1b0605; }

/* ---------- login ---------- */
.page-login { display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; animation: rise .4s var(--ease); }
.login__form { width: 100%; margin-top: 36px; }
.field-label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 8px 2px; }
.field input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  outline: none; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--line-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.login__error { min-height: 22px; margin: 10px 2px; color: var(--err); font-size: 13.5px; }
.login__foot { margin-top: 40px; color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.shake { animation: shake .35s var(--ease); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .preview { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
  .preview__media { aspect-ratio: 16 / 9; }
  .preview__media.is-square { aspect-ratio: 16 / 9; }
  .format { max-width: none; }
  .preview__actions .btn { flex: 1; }
  .omnibox { flex-wrap: wrap; }
  .omnibox input { flex-basis: calc(100% - 60px); order: 1; }
  .omnibox__tag { order: 0; }
  .omnibox__paste { order: 2; }
  .omnibox #inspect-btn { order: 3; width: 100%; }
  .job { grid-template-columns: 44px 1fr; gap: 12px; }
  .job__thumb { width: 44px; height: 44px; }
  .job__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .history__head { flex-direction: column; gap: 2px; }
  .history__note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- account bar ---------- */
.topbar__right { display: flex; align-items: center; gap: 8px; }
.me { font-size: 13px; color: var(--muted); margin-right: 4px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.is-off { opacity: .35; text-decoration: line-through; }
.quota { margin: 2px 2px 0; font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.quota.is-out { color: var(--err); }
.field-label--gap { margin-top: 14px; }

/* ---------- modal ---------- */
.modal {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.modal[open] { animation: rise .25s var(--ease); display: flex; flex-direction: column; }
.modal > form { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(6, 6, 5, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal--wide { width: min(620px, calc(100vw - 32px)); }
.modal__title { margin: 0 0 12px; font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.modal__text { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.modal__scroll {
  overflow: auto; min-height: 120px;
  padding: 2px 14px 2px 0; margin-bottom: 16px;
  font-size: 14px; line-height: 1.6; color: #d6d4cc;
  border-bottom: 1px solid var(--line);
}
.modal__scroll p { margin: 0 0 12px; }
.modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.secret {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 6px 0 0; padding: 12px 14px;
  font: 600 16px var(--mono); letter-spacing: .04em;
  background: var(--bg); border: 1px dashed var(--line-2); border-radius: 10px;
  user-select: all; overflow-wrap: anywhere;
}

/* ---------- admin ---------- */
.shell--wide { max-width: 1080px; padding-top: 32px; }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 14px; margin-bottom: -1px;
  background: none; border: 0; border-bottom: 2px solid transparent;
  color: var(--muted); font-weight: 600; cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.grid-form { display: grid; gap: 14px; }
.grid-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: inline-block; padding: 6px 12px; font-size: 13px;
  border: 1px solid var(--line-2); border-radius: 99px; cursor: pointer; color: var(--muted);
  transition: all .15s;
}
.choice input:checked + span { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.select, .input {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}
.select:focus, .input:focus { border-color: var(--line-2); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 10px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.table .nowrap { white-space: nowrap; }
.table .mono { font-family: var(--mono); font-size: 12px; }
.table a { color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.table a:hover { color: var(--text); text-decoration: underline; }
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap;
}
.badge--ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.badge--err { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.badge--warn { color: #f2c46d; border-color: color-mix(in srgb, #f2c46d 40%, transparent); }
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--err) 45%, transparent); color: var(--err); }
.btn--danger:hover { background: color-mix(in srgb, var(--err) 10%, transparent); }
.filters { display: grid; grid-template-columns: 180px 180px 1fr auto; gap: 8px; margin-bottom: 14px; }
.empty-row td { text-align: center; color: var(--faint); padding: 28px; }
.ev-done { color: var(--ok); }
.ev-error, .ev-denied, .ev-fail { color: var(--err); }

@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .input { grid-column: 1 / -1; }
  .grid-form .row { grid-template-columns: 1fr; }
  .me { display: none; }
}

/* ---------- playlist ---------- */
.collection {
  margin-top: 10px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  animation: rise .35s var(--ease);
}
.collection__head { display: flex; gap: 16px; align-items: center; }
.collection__cover { width: 96px; height: 96px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.collection__cover img { width: 100%; height: 100%; object-fit: cover; }
.collection__info { min-width: 0; }
.collection__info .preview__author { margin-bottom: 0; }
.collection__bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 16px 0 8px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.collection__bar .btn { margin-left: auto; }
.formats--inline .format { flex: none; }
.formats--inline .format label { flex-direction: row; gap: 6px; padding: 7px 12px; }
.tracks { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; }
.track {
  display: grid; grid-template-columns: 22px 28px 1fr auto; align-items: center; gap: 10px;
  padding: 7px 4px; border-radius: 8px; cursor: pointer;
}
.track:hover { background: var(--surface-2); }
.track input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.track__n { font: 12px var(--mono); color: var(--faint); text-align: right; }
.track__text { min-width: 0; }
.track__title { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__artist { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track__dur { font: 12px var(--mono); color: var(--muted); }
.track.is-off .track__text { opacity: .4; }

.batches { display: grid; gap: 8px; margin-bottom: 14px; }
.batch {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  animation: rise .3s var(--ease);
}
.batch__name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch__stats { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.batch__actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; }
.batch .bar { grid-column: 1; margin-top: 2px; }
@media (max-width: 640px) {
  .collection__cover { width: 72px; height: 72px; }
  .collection__bar .btn { width: 100%; margin-left: 0; }
  .batch { grid-template-columns: 1fr; }
  .batch__actions { grid-row: auto; grid-column: 1; }
}

/* ---------- admin: YouTube ---------- */
.card { padding: 16px 18px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card__title { margin: 0 0 8px; font-size: 15px; font-weight: 650; }
.card__row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.card p { margin: 0 0 8px; }
.steps { margin: 8px 0 12px; padding-left: 20px; color: #d6d4cc; line-height: 1.7; }
.mono { font-family: var(--mono); font-size: .92em; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.yt-result { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; font-size: 14px; border: 1px solid var(--line-2); }
.yt-result.is-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.yt-result.is-err { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
