/* ══════════════════════════════════════════════════════════════════
   BandRaven — screen styles
   auth · onboarding · releases · library · purchase · settings
   ══════════════════════════════════════════════════════════════════ */

/* ══ AUTH ═════════════════════════════════════ */
.auth {
  position: fixed; inset: 0; z-index: 50;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background:
    linear-gradient(180deg, var(--bg-elev), var(--bg) 42%, var(--bg)),
    var(--bg);
}

.landing {
  min-height: 100%;
  color: var(--text);
  background:
    linear-gradient(90deg, var(--landing-veil), transparent 30%, var(--landing-veil) 100%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 96px 96px, 96px 96px;
}

.landing-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s5);
  min-height: 72px; padding: 0 var(--s7);
  background: var(--landing-veil-2);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(130%);
}
.landing-brand {
  display: inline-flex; align-items: center; gap: var(--s3);
  color: var(--text); text-decoration: none; flex: 0 0 auto;
}
.landing-mark { width: 34px; height: 34px; flex: 0 0 34px; }
.landing-word { font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.landing-word b,
.auth-word b { font-weight: 600; }
.landing-word i,
.auth-word i {
  font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400;
}
.landing-links {
  display: flex; align-items: center; gap: var(--s5);
  margin-left: auto;
}
.landing-links a {
  color: var(--text-3); text-decoration: none; font-size: 13px;
  transition: color 140ms var(--ease);
}
.landing-links a:hover { color: var(--text); }
.landing-nav-actions { display: flex; align-items: center; gap: var(--s2); }

.landing-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: var(--s6);
  min-height: calc(100vh - 152px);
  padding: var(--s8) var(--s7) var(--s7);
  overflow: hidden;
}
.landing-hero-copy {
  position: relative; z-index: 2;
  align-self: center;
  max-width: 760px;
  padding: var(--s7) 0;
}
.landing-hero h1,
.landing-section h2,
.landing-final h2 {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.landing-hero h1 { margin-top: var(--s4); }
.landing-hero h1 .serif,
.landing-section h2 .serif,
.landing-final h2 .serif { color: var(--accent); }
.landing-lede {
  max-width: 620px;
  margin-top: var(--s5);
  color: var(--text-2);
  font-size: 18px;
  line-height: 1.55;
}
.landing-hero-actions {
  display: flex; align-items: center; gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s6);
}
.landing-proof {
  display: flex; flex-wrap: wrap; gap: var(--s2);
  margin-top: var(--s5);
}
.landing-proof span {
  display: inline-flex; align-items: center; gap: var(--s1);
  padding: var(--s2) var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--landing-veil-2);
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 10.5px;
}
.landing-proof b { color: var(--text); font-weight: 500; }

.landing-hero-art {
  position: absolute; inset: 0;
  pointer-events: none;
}
.landing-hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--landing-veil) 34%, transparent 60%),
    linear-gradient(180deg, transparent 58%, var(--bg) 100%);
}
.landing-hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center right;
  opacity: 0.78;
  filter: saturate(0.88) contrast(1.04);
}

.auth-panel {
  position: relative; z-index: 3;
  align-self: center;
}
.auth-panel-head {
  display: flex; align-items: flex-start; flex-direction: column; gap: var(--s2);
  margin-bottom: var(--s3);
}
.auth-panel-head p {
  max-width: 360px;
  color: var(--text-3);
  font-size: 12.5px;
  text-align: left;
}

.auth-card {
  background: var(--landing-veil-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: var(--s5);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(20px) saturate(130%);
}
.auth-card.shake { animation: shake 420ms var(--ease); }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

.auth-tabs { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; margin-bottom: var(--s5); }
.auth-tab { flex: 1; height: 32px; border: none; background: transparent; color: var(--text-3); font-family: var(--ui); font-size: 13px; font-weight: 500; border-radius: var(--r-xs); cursor: pointer; transition: color 140ms var(--ease), background 140ms var(--ease); }
.auth-tab.active { color: var(--text); background: var(--surface-4); }

/* floating-label field */
.field { position: relative; margin-bottom: var(--s5); }
.field input {
  width: 100%; height: 44px; background: transparent; border: none;
  border-bottom: 1.5px solid var(--line-2); color: var(--text);
  font-family: var(--ui); font-size: 15px; padding: 12px 0 4px;
  transition: border-color 200ms var(--ease);
}
.field input:focus { outline: none; border-color: var(--accent); }
.field label {
  position: absolute; left: 0; top: 14px; color: var(--text-3); font-size: 15px;
  pointer-events: none; transform-origin: left;
  transition: transform 180ms var(--ease), color 180ms var(--ease);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-14px) scale(0.74); color: var(--text-3);
}
.field input:focus + label { color: var(--accent); }
.field.error input { border-color: var(--err); }
.field.error label { color: var(--err); }
.field.flash input { animation: errFlash 220ms var(--ease); }
@keyframes errFlash { 0%,100% { border-color: var(--err); } 50% { border-color: var(--err); box-shadow: 0 1px 0 var(--err); } }

.auth-err { color: var(--err); font-size: 12.5px; min-height: 16px; margin: -8px 0 12px; opacity: 0; transition: opacity 160ms var(--ease); }
.auth-err.show { opacity: 1; }
.auth-submit { width: 100%; }
.auth-foot { text-align: center; margin-top: var(--s4); color: var(--text-3); font-size: 12.5px; }
.auth-link-strong { color: var(--accent); }
.auth-dot { color: var(--text-4); }

.auth-simple {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: var(--s6);
}
.auth-simple .auth-card { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: var(--s7); }
.auth-mark { width: 64px; height: 64px; margin: 0 auto var(--s4); }
.auth-word { font-size: 42px; line-height: 1; letter-spacing: -0.02em; }
.auth-simple-title { font-size: 15px; font-weight: 600; margin-bottom: var(--s1); }
.auth-simple-copy { font-size: 13px; color: var(--text-3); margin-bottom: var(--s4); }
.auth-result {
  text-align: center;
  padding: var(--s5) 0;
  display: grid;
  justify-items: center;
  gap: var(--s3);
}
.auth-result-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ok-bg);
  border: 1px solid var(--ok);
  color: var(--ok);
  font-family: var(--mono);
  font-size: 10px;
}

.landing-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--landing-veil-2);
}
.landing-trust div {
  min-height: 116px;
  padding: var(--s5) var(--s7);
  border-right: 1px solid var(--line);
}
.landing-trust div:last-child { border-right: none; }
.landing-trust strong {
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1;
  color: var(--text);
}
.landing-trust span {
  display: block;
  max-width: 240px;
  margin-top: var(--s3);
  color: var(--text-3);
  font-size: 13px;
}

.landing-section {
  padding: var(--s8) var(--s7);
}
.landing-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s7);
  margin-bottom: var(--s6);
}
.landing-section h2,
.landing-final h2 {
  font-size: clamp(32px, 4.5vw, 58px);
  line-height: 1;
  margin-top: var(--s3);
}
.landing-section-head p {
  max-width: 440px;
  color: var(--text-3);
  font-size: 15px;
}

.preview-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-strong);
}
.preview-shell::before {
  content: "";
  position: absolute; inset: 0;
  border: 1px solid var(--accent-line);
  border-radius: inherit;
  opacity: 0.45;
  pointer-events: none;
}
.preview-shell img {
  display: block;
  width: 100%;
  height: auto;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s3);
}
.benefit-grid article,
.price-card,
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.benefit-grid article {
  padding: var(--s5);
}
.benefit-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  color: var(--accent);
  background: var(--accent-ghost);
}
.benefit-icon svg { width: 20px; height: 20px; }
.benefit-grid h3,
.how-list h3,
.price-card h3 {
  font-size: 17px;
  line-height: 1.2;
  font-weight: 600;
  margin-top: var(--s4);
}
.benefit-grid p,
.how-list p,
.price-card p,
.faq-list p {
  color: var(--text-3);
  font-size: 13.5px;
  margin-top: var(--s2);
}

.landing-how {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
  gap: var(--s7);
  align-items: center;
  background: var(--bg-elev);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.signal-card {
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.signal-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.how-list {
  list-style: none;
  display: grid;
  gap: var(--s4);
  margin-top: var(--s6);
}
.how-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
}
.how-list span {
  font-family: var(--mono);
  color: var(--landing-amber);
  font-size: 12px;
}
.how-list h3 { margin-top: 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}
.price-card {
  padding: var(--s6);
}
.price-card.featured {
  border-color: var(--accent-line);
  background:
    linear-gradient(135deg, var(--accent-ghost), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.price-kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
}
.price-card h3 {
  font-size: 44px;
  line-height: 1;
  margin-top: var(--s3);
}
.price-card h3 span {
  color: var(--text-3);
  font-size: 15px;
  font-weight: 400;
}
.price-card ul {
  display: grid;
  gap: var(--s3);
  margin: var(--s5) 0;
  list-style: none;
}
.price-card li {
  position: relative;
  padding-left: var(--s5);
  color: var(--text-2);
  font-size: 13.5px;
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.6em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-ghost);
}

.landing-faq {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1fr);
  gap: var(--s7);
}
.faq-list {
  display: grid;
  gap: var(--s3);
}
.faq-list details {
  padding: var(--s4) var(--s5);
}
.faq-list summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.faq-list summary::marker { color: var(--accent); }

.landing-final {
  margin: 0 var(--s7) var(--s7);
  padding: var(--s8);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-xl);
  background:
    linear-gradient(135deg, var(--accent-ghost), transparent 40%),
    linear-gradient(90deg, var(--landing-amber-soft), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-soft);
}
.landing-final p {
  max-width: 560px;
  margin: var(--s4) 0 var(--s6);
  color: var(--text-2);
  font-size: 17px;
}
.landing-footer {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s5) var(--s7) var(--s7);
  color: var(--text-3);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.landing-footer-legal {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-4);
}
.landing-footer-legal a { color: var(--text-4); text-decoration: none; }
.landing-footer-legal a:hover { color: var(--text-3); text-decoration: underline; }

@media (max-width: 1100px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }
  .auth-panel {
    max-width: 460px;
  }
  .landing-hero-art img {
    object-position: 68% center;
    opacity: 0.54;
  }
  .benefit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .landing-how,
  .landing-faq { grid-template-columns: minmax(0, 1fr); }
  .signal-card { max-width: 520px; }
}

@media (max-width: 760px) {
  .landing-nav {
    min-height: auto;
    padding: var(--s3) var(--s4);
    flex-wrap: wrap;
  }
  .landing-links { display: none; }
  .landing-nav-actions { margin-left: auto; }
  .landing-nav-actions .btn-ghost { display: none; }
  .landing-word { font-size: 20px; }
  .landing-hero {
    padding: var(--s5) var(--s4);
    gap: var(--s5);
  }
  .landing-hero-copy {
    padding: var(--s5) 0 0;
  }
  .landing-hero h1 {
    font-size: clamp(38px, 12vw, 52px);
  }
  .landing-lede {
    font-size: 15.5px;
    margin-top: var(--s4);
  }
  .landing-proof { display: none; }
  .landing-hero-actions .btn,
  .landing-final .btn {
    width: 100%;
  }
  .auth-panel-head p { max-width: none; }
  .landing-trust,
  .benefit-grid,
  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .landing-trust div {
    min-height: auto;
    padding: var(--s4);
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .landing-trust div:last-child { border-bottom: none; }
  .landing-section {
    padding: var(--s7) var(--s4);
  }
  .landing-section-head {
    display: grid;
    gap: var(--s4);
  }
  .preview-shell {
    border-radius: var(--r-lg);
  }
  .preview-shell img {
    width: 220%;
    max-width: none;
  }
  .how-list li {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .price-card {
    padding: var(--s5);
  }
  .landing-final {
    margin: 0 var(--s4) var(--s6);
    padding: var(--s6) var(--s5);
  }
  .landing-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: var(--s5) var(--s4) var(--s7);
  }
}

/* animated vinyl mark */
.vinyl { display: block; }
.vinyl .disc { transform-origin: 32px 32px; animation: spinDisc 8s linear infinite; }
@keyframes spinDisc { to { transform: rotate(360deg); } }
.vinyl .wave path { animation: wavePulse 2.4s var(--ease) infinite; }
@keyframes wavePulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ══ ONBOARDING ═══════════════════════════════ */
.onb { position: fixed; inset: 0; z-index: 48; background: var(--bg); display: flex; }
.onb-spine {
  width: 280px; flex: 0 0 280px; border-right: 1px solid var(--line);
  padding: var(--s7) var(--s6); display: flex; flex-direction: column;
  background: var(--bg-elev);
}
.onb-spine .auth-word { font-size: 22px; margin-bottom: var(--s8); }
.spine-steps { display: flex; flex-direction: column; position: relative; }
.spine-line { position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--line-2); }
.spine-fill { position: absolute; left: 8px; top: 10px; width: 2px; background: var(--accent); height: 0; transition: height 420ms var(--sheet); box-shadow: 0 0 8px var(--accent-glow); }
.spine-step { display: flex; align-items: center; gap: var(--s3); padding: 10px 0; position: relative; z-index: 1; }
.spine-dot { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-3); display: grid; place-items: center; transition: all 300ms var(--ease); }
.spine-dot svg { width: 10px; height: 10px; opacity: 0; color: #fff; }
.spine-step.done .spine-dot { background: var(--accent); border-color: var(--accent); }
.spine-step.done .spine-dot svg { opacity: 1; }
.spine-step.active .spine-dot { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.spine-label { font-size: 13px; color: var(--text-3); transition: color 200ms var(--ease); }
.spine-step.active .spine-label, .spine-step.done .spine-label { color: var(--text); }

.onb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: var(--s7); overflow: hidden; }
.onb-stage { flex: 1; display: grid; place-items: center; position: relative; }
.onb-step {
  position: absolute; width: 100%; max-width: 460px;
  opacity: 0; transform: translateX(40px); pointer-events: none;
  transition: opacity 360ms var(--sheet), transform 360ms var(--spring);
}
.onb-step.in { opacity: 1; transform: none; pointer-events: auto; }
.onb-step.out-left { opacity: 0; transform: translateX(-40px); }
.onb-q { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: var(--s3); }
.onb-q i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.onb-sub { color: var(--text-3); font-size: 14px; margin-bottom: var(--s6); }
.onb-foot { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s6); }
.onb-skip { color: var(--text-3); }

.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.svc {
  display: flex; align-items: center; gap: var(--s3); padding: 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); cursor: pointer; background: var(--surface);
  transition: border-color 160ms var(--ease), background 160ms var(--ease), transform 120ms var(--ease);
}
.svc:hover { border-color: var(--line-3); }
.svc:active { transform: scale(0.98); }
.svc.sel { border-color: var(--accent-line); background: var(--accent-ghost); }
.svc-ico { width: 28px; height: 28px; flex: 0 0 28px; border-radius: var(--r-sm); display: grid; place-items: center; }
.svc-name { font-size: 13.5px; font-weight: 500; }
.svc-sub { font-size: 11px; color: var(--text-3); }
.svc-check { margin-left: auto; width: 18px; height: 18px; color: var(--accent); opacity: 0; transition: opacity 160ms var(--ease); }
.svc.sel .svc-check { opacity: 1; }

.seed-chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.seed-chip {
  font-size: 13px; padding: 7px 13px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  transition: all 140ms var(--ease);
}
.seed-chip:hover { border-color: var(--line-3); color: var(--text); }
.seed-chip.sel { background: var(--accent); border-color: transparent; color: #fff; }

/* ══ RELEASES (hero) ══════════════════════════ */
/* ── sticky header bar ───────────────────── */
.rel-header {
  position: sticky; top: 0; z-index: 12;
  background: var(--bg-elev); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.rel-header-inner {
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; gap: var(--s4);
  padding: var(--s3) var(--s7);
  flex-wrap: wrap;
}
.rel-header-left { display: flex; align-items: center; gap: var(--s3); flex: 1 1 760px; min-width: 0; flex-wrap: wrap; }
.rel-header-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.rel-header-title i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.rel-header-count { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent); margin-left: 6px; }
.rel-header-pills { display: inline-flex; gap: 1px; padding: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.rel-header-pills .pill { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: var(--r-xs); color: var(--text-3); cursor: pointer; transition: all 140ms var(--ease); white-space: nowrap; }
.rel-header-pills .pill:hover { color: var(--text); }
.rel-header-pills .pill.active { color: var(--text); background: var(--surface-3); }
.rel-header-sep { width: 1px; height: 20px; background: var(--line-2); flex-shrink: 0; }
.rel-header-search-wrap {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: 1 1 420px;
  min-width: min(100%, 280px);
}
.rel-header-search { flex: 1 1 auto; min-width: 0; }
.rel-header-search .input { height: 38px; font-family: var(--ui); font-size: 13.5px; }
.rel-header-right { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; margin-left: auto; }
.rel-add-from-search { display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap; font-size: 11px; }
.rel-add-from-search svg { width: 14px; height: 14px; }
.rel-add-from-search[hidden] { display: none; }
@media (max-width: 880px) {
  .rel-header-right,
  .rel-header-search-wrap { width: 100%; }
  .rel-header-right { justify-content: flex-start; margin-left: 0; }
}
@media (max-width: 660px) {
  .rel-header-sep { display: none; }
  .rel-header-search-wrap { flex-direction: column; align-items: stretch; }
  .rel-add-from-search { justify-content: center; }
}

/* ── toolbar ────────────────────────────── */
.rel-toolbar {
  display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap;
  margin-bottom: var(--s5); padding: var(--s2) 0;
}
.rel-toolbar .search { width: 240px; }
#relSyncBtn { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s2); border-radius: var(--r-sm); }
#relSyncBtn:disabled { opacity: 0.7; cursor: default; }
#relSyncBtn.syncing .sync-ico { animation: spin 1s linear infinite; }
#relSyncBtn:not(:disabled) { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 10px var(--accent-glow); }
  50% { box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.35); }
}
@media (prefers-reduced-motion: reduce) {
  #relSyncBtn:not(:disabled) { animation: none; }
}
@media (max-width: 560px) { #relSyncBtn { margin-left: 0; } .rel-toolbar .search { width: 100%; } }

/* ── Sync progress panel ──────────────────────────────────────── */
.sync-panel {
  margin-bottom: var(--s4);
  padding: 14px 16px 12px;
  background: var(--surface-2);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  animation: fadeUp 240ms var(--ease);
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sync-panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s3); margin-bottom: 10px; flex-wrap: wrap;
}
.sync-panel-status { font-size: 13px; font-weight: 500; color: var(--text); }
.sync-panel-status strong { color: var(--accent); }
.sync-panel-meta { font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.sync-bar-track {
  height: 4px; background: var(--surface-4); border-radius: 2px; overflow: hidden;
}
.sync-bar-fill {
  height: 100%; background: var(--accent); border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.sync-bar-fill.done { background: var(--ok); }

.rel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s4);
}
.lbl-release-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.rel-card {
  position: relative; border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  opacity: 0; transform: translateY(16px);
  transition: border-color 180ms var(--ease), box-shadow 240ms var(--ease), background 180ms var(--ease);
}
.rel-card.in { animation: cardIn 420ms var(--ease) forwards; }
@keyframes cardIn { to { opacity: 1; transform: none; } }
.rel-card:hover {
  border-color: var(--accent-line);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.rel-art { position: relative; aspect-ratio: 1; overflow: hidden; }
.rel-art-bg { position: absolute; inset: 0; }
/* real cover art (production: release.artUrl) — fades over the procedural fallback */
.rel-art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms var(--ease); }
.rel-art-img.loaded { opacity: 1; }
/* generative motif overlays */
.rel-art .motif { position: absolute; inset: 0; mix-blend-mode: soft-light; opacity: 0.9; }
.rel-art .grain { position: absolute; inset: 0; opacity: 0.10; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.rel-new {
  position: absolute; top: var(--s2); left: var(--s2); z-index: 3;
  height: 22px; padding: 0 var(--s2); display: inline-flex; align-items: center;
  border-radius: var(--r-xs); border: 1px solid var(--accent-line);
  background: var(--accent); color: var(--accent-ink);
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.rel-srcs { position: absolute; bottom: 8px; right: 8px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.rel-src { font-family: var(--mono); font-size: 9px; letter-spacing: 0.05em; padding: 2px 5px; border-radius: var(--r-xs); border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2); }
.rel-card-new { border-color: var(--accent-line) !important; }

/* thumbnail actions */
.rel-save-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s2);
  padding: var(--s2);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.rel-card-action {
  min-width: 0;
  height: 32px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  padding: 0 var(--s2);
  font-size: 11.5px;
  font-weight: 600;
  transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.rel-card-action svg { width: 14px; height: 14px; stroke-width: 2; }
.rel-card-action:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-3); }
.rel-card-action.on { background: var(--accent-ghost); border-color: var(--accent-line); color: var(--accent); }
.rel-action-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-danger-actions {
  position: absolute;
  top: var(--s2);
  right: var(--s2);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: var(--s1);
}
.rel-act {
  width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid var(--line-2); cursor: pointer;
  background: var(--surface-3); color: var(--text-3);
  display: grid; place-items: center; transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease), width 160ms var(--ease), padding 160ms var(--ease);
  position: relative;
  overflow: hidden;
}
.rel-act svg { width: 14px; height: 14px; stroke-width: 2; }
.rel-act:hover { background: var(--surface-4); color: var(--text); border-color: var(--line-3); }
.rel-act::after {
  content: attr(data-tip);
  opacity: 0;
  max-width: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  transition: opacity 140ms var(--ease), max-width 160ms var(--ease);
}
.rel-act:hover {
  width: auto;
  min-width: 30px;
  padding: 0 var(--s2);
  grid-auto-flow: column;
  gap: var(--s1);
}
.rel-act:hover::after { opacity: 1; max-width: 96px; }
.rel-del:hover,
.rel-unfollow:hover { background: var(--err-bg); border-color: var(--err); color: var(--err); }

/* resting caption (below art) */
.rel-cap { min-height: 82px; padding: 10px 11px 12px; display: grid; align-content: start; gap: 3px; }
.rel-cap .a { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text-2); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-cap .a span { color: var(--text); }
.rel-card:hover .rel-cap .a { color: var(--text); }
.rel-card:hover .rel-cap .a span { color: var(--text); }
.rel-cap .l { font-size: 10px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rel-cap .d { font-size: 9.5px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rel-card.kbfocus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-ring); }

.rel-confirm-backdrop {
  position: fixed; inset: 0; z-index: 220; display: grid; place-items: center;
  padding: var(--s4); background: var(--scrim); opacity: 0; pointer-events: none;
  transition: opacity 180ms var(--ease);
}
.rel-confirm-backdrop.show { opacity: 1; pointer-events: auto; }
.rel-confirm {
  position: relative; width: min(420px, 100%); padding: var(--s5);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-strong);
}
.rel-confirm h2 { font-size: 20px; line-height: 1.2; font-weight: 600; margin-top: var(--s1); }
.rel-confirm p:not(.eyebrow) { margin-top: var(--s3); color: var(--text-3); font-size: 13px; }
.rel-confirm-x {
  position: absolute; top: var(--s3); right: var(--s3);
  width: 30px; height: 30px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text-3);
  display: grid; place-items: center; cursor: pointer;
}
.rel-confirm-x:hover { background: var(--surface-3); color: var(--text); }
.rel-confirm-x svg { width: 14px; height: 14px; }
.rel-confirm-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }

@media (prefers-reduced-motion: reduce) {
  .rel-card,
  .rel-art-img,
  .rel-act,
  .rel-card-action,
  .rel-confirm-backdrop { transition: none; }
  .rel-card.in { animation: none; opacity: 1; transform: none; }
}

/* label cards in releases labels tab */
.lbl-card { cursor: pointer; }
.lbl-card:hover,
.lbl-card-loading { border-color: var(--accent-line); }
.lbl-card-loading {
  background: var(--surface-2);
  box-shadow: 0 0 0 2px var(--accent-ring);
}
.lbl-art {
  display: grid;
  place-items: center;
  background: var(--surface-3);
}
.lbl-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lbl-art-fallback {
  color: var(--text-4);
}
.lbl-art-fallback svg {
  width: var(--s5);
  height: var(--s5);
  opacity: 0.7;
}
.lbl-card .rel-cap { text-align: center; }
.lbl-card-cap { padding: var(--s3); }
.lbl-card-name { text-align: center; }
.lbl-detail-header h2 {
  font-size: 20px;
  font-weight: 600;
}
.lbl-detail-header .ct { color: var(--text-4); }
.lbl-empty {
  text-align: center;
  padding: var(--s6) var(--s5);
  color: var(--text-4);
}
.lbl-empty p + p {
  margin-top: var(--s2);
  font-size: 12px;
}
.lbl-loading-card {
  cursor: default;
  pointer-events: none;
  background: var(--surface);
}
.lbl-loading-card .rel-art,
.lbl-loading-line {
  background: var(--surface-2);
}
.lbl-loading-line {
  width: 78%;
  height: 11px;
  border-radius: var(--r-xs);
}
.lbl-loading-line.short {
  width: 48%;
  margin-top: var(--s2);
}
.lbl-sync-btn { font-size: 11px; min-height: 28px; }
.lbl-refresh-btn { margin-left: auto; }
.lbl-sync-btn.lbl-sync-progress {
  width: 100%;
  height: auto;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: normal;
  line-height: 1.25;
}
.lbl-sync-btn.lbl-sync-progress:disabled {
  opacity: 1;
}
.lbl-sync-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  max-width: 100%;
  color: var(--text);
}
.lbl-sync-main svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  animation: spin 1s linear infinite;
}
.lbl-sync-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.25;
}

@media (max-width: 880px) {
  .lbl-release-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* month grouping */
.rel-month-sep {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 8px;
  padding: 20px 0 6px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.rel-month-sep.rel-month-sep-first { padding-top: 0; border-top: none; margin-top: 0; }
.rel-month-label { font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }
.rel-month-sep::after { content: ""; height: 1px; flex: 1; background: var(--line); min-width: 24px; }
.rel-month-ct { font-family: var(--mono); font-size: 11px; color: var(--text-4); }

/* skeleton */
.skel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.skel-art { aspect-ratio: 1; position: relative; overflow: hidden; background: var(--surface-2); }
.skel-cap { padding: 10px 11px 12px; }
.skel-line { height: 11px; border-radius: 4px; background: var(--surface-2); margin-bottom: 7px; }
.skel-line.w60 { width: 60%; }
.shimmerbg { position: relative; overflow: hidden; }
.shimmerbg::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent); animation: skelSweep 1.4s ease infinite; }
@keyframes skelSweep { to { transform: translateX(100%); } }

/* empty state */
.rel-empty { display: grid; place-items: center; text-align: center; padding: var(--s8) 0; }
.radar { width: 180px; height: 180px; margin: 0 auto var(--s5); position: relative; }
.radar .sweep { transform-origin: 90px 90px; animation: radarSpin 4s linear infinite; }
@keyframes radarSpin { to { transform: rotate(360deg); } }
.radar .ping { transform-origin: center; animation: ping 3s var(--ease) infinite; }
@keyframes ping { 0% { r: 2; opacity: 1; } 100% { r: 40; opacity: 0; } }
.rel-empty h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.rel-empty p { color: var(--text-3); font-size: 14px; margin: 8px 0 24px; max-width: 360px; }

/* sync FAB */
.fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 40;
  width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(var(--accent-rgb), 0.4), 0 0 0 1px rgba(255,255,255,0.06) inset;
  transition: transform 140ms var(--spring), box-shadow 200ms var(--ease);
}
.fab:hover { transform: scale(1.05); }
.fab:active { transform: scale(0.94); }
.fab svg { width: 26px; height: 26px; stroke-width: 2; }
.fab.pulse { animation: fabPulse 3s var(--ease) infinite; }
@keyframes fabPulse { 0%,100% { box-shadow: 0 8px 30px rgba(var(--accent-rgb),0.35); } 50% { box-shadow: 0 8px 44px rgba(var(--accent-rgb),0.7); } }
.fab.syncing svg.sync-ico { animation: spin 1s linear infinite; }
.fab-arc { position: absolute; inset: -3px; pointer-events: none; transform: rotate(-90deg); }
.fab-arc circle { fill: none; stroke: var(--accent-h); stroke-width: 3; stroke-linecap: round; opacity: 0; transition: opacity 200ms; }
.fab.syncing .fab-arc circle { opacity: 1; }
@media (max-width: 880px) { .fab { bottom: 76px; right: 18px; } }

/* ══ RELEASE DETAIL SHEET ─────────────────────── */
.sheet-hero { position: relative; height: 220px; flex-shrink: 0; overflow: hidden; }
.sheet-hero .rel-art-bg { position: absolute; inset: 0; }
.sheet-close { position: absolute; top: 8px; right: 10px; z-index: 3; width: 28px; height: 28px; border-radius: 99px; border: none; cursor: pointer; background: rgba(0,0,0,0.45); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; }
.sheet-close svg { width: 14px; height: 14px; }
.sheet-close:hover { background: rgba(0,0,0,0.7); }

.sheet-player-wrap {
  flex: 1 1 auto;
  min-height: 280px;
  padding: var(--s3) var(--s4) var(--s4);
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}
.sheet-player-wrap iframe { width: 100%; border: 0; border-radius: var(--r-md); }
/* Collapse the player area entirely when there is no embed to show
   (no Bandcamp album id, no Apple Music embed) — avoids a large empty void. */
.sheet-player-wrap:empty { display: none; min-height: 0; padding: 0; border-top: none; }

/* The live embed now lives in the persistent dock, not here. The wrap only ever
   holds a compact control: a Play CTA, a "playing below" hint, or a loading state. */
.sheet-player-wrap.compact { flex: 0 0 auto; min-height: 0; }
.sheet-play-cta {
  width: 100%; height: 48px; border-radius: var(--r-md);
  border: 1px solid transparent; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  transition: background 140ms var(--ease);
}
.sheet-play-cta:hover { background: var(--accent-d); }
.sheet-play-cta svg { width: 16px; height: 16px; }
.sheet-now-playing {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-3); font-size: 12px; font-weight: 500;
}
.sheet-now-playing svg { width: 13px; height: 13px; color: var(--accent); }
.sheet-player-loading {
  height: 64px; display: flex; align-items: center; justify-content: center;
  color: var(--text-4); font-size: 13px; border-radius: 8px; background: var(--surface-2);
}

/* When the dock is pinned as the open card's footer, reserve space so the short,
   tracklist-free embed-card content clears the bottom-pinned player. */
body.dock-expanded .sheet-footer { padding-bottom: 360px; }

/* ── tracklist ──────────────────────────────── */
.tracklist {
  margin-top: var(--s3);
  border-top: 1px solid var(--line);
}
.track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
}
.track:last-child { border-bottom: none; }
.track-n {
  flex: 0 0 auto;
  min-width: 20px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}
.track-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-dur {
  flex: 0 0 auto;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}
.track-play {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  cursor: pointer;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.track-play svg { width: 18px; height: 18px; }
.track-playable { cursor: pointer; }
.track-playable:hover { color: var(--text); }
.track-playable:hover .track-play { background: var(--surface-3); color: var(--text); }
.track-playable.playing .track-name { color: var(--accent); }
.track-playable.playing .track-play { background: var(--accent); color: #fff; }

.sheet-footer { flex: 0 0 auto; padding: var(--s3) var(--s4) var(--s3); }
.sheet-info-card {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
  min-height: 96px;
  margin-bottom: var(--s3);
  padding: var(--s3);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.sheet-info-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--surface));
  opacity: .54;
}
.sheet-info-art {
  position: relative;
  z-index: 1;
  width: 72px;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: 0 12px 34px var(--scrim);
}
.sheet-info-art .rel-art { border-radius: var(--r-sm); }
.sheet-info-main { position: relative; z-index: 1; min-width: 0; }
.sheet-titleblock { padding: var(--s2) 0 0; }
.sheet-titleblock .eyebrow { font-size: 10px; margin-bottom: 4px; }
.sheet-titleblock .eyebrow a { color: var(--text-2); text-decoration: none; cursor: pointer; transition: color 140ms var(--ease); }
.sheet-titleblock .eyebrow a:hover { color: var(--accent); }
.sheet-meta { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) 0; }
.sheet-follow { display: flex; gap: var(--s2); padding: var(--s2) 0 var(--s3); }
.sheet-follow .btn { flex: 1; }
.sheet-follow .btn.on { border-color: var(--accent-line); color: var(--accent); background: var(--accent-ghost); }
.sheet-follow .btn.on:disabled { opacity: 1; cursor: default; }
.sheet-actions { display: flex; gap: var(--s2); padding: 0 0 var(--s3); }
.sheet-actions .btn { flex: 1; }

.sheet-links { display: flex; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s2); }
.sheet-link { flex: 1; min-width: 90px; height: 36px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none; font-size: 12px; transition: all 140ms var(--ease); white-space: nowrap; }
.sheet-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.sheet-link:hover { border-color: var(--line-3); color: var(--text); background: var(--surface-2); }

.sheet-head {
  position: relative;
  flex: 0 0 auto;
  padding: var(--s5) var(--s5) var(--s4);
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 {
  max-width: calc(100% - 42px);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.sheet-head .sheet-close {
  top: var(--s4);
  right: var(--s4);
}
.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--s4) var(--s5) var(--s5);
}
/* ══ ADMIN ───────────────────────────────────── */
.admin-head { align-items: center; }
.admin-head-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.admin-band { display: grid; gap: var(--s4); }
.admin-diagnostics {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s4);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.admin-diagnostics.admin-loading { text-align: left; color: var(--text-3); }
.admin-diagnostics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s3);
}
.admin-diagnostics-head h2 { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.admin-diagnostics-head p:not(.eyebrow) { margin-top: 2px; color: var(--text-4); font-size: 12px; }
.admin-diagnostic-services {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.admin-diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.1fr);
  gap: var(--s3);
}
.admin-diagnostic-notes { display: grid; gap: var(--s2); }
.admin-note {
  padding: var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-note.ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.admin-note.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.admin-note.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s3);
}
.admin-stat {
  min-width: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.admin-stat-value { font-size: 24px; font-weight: 650; letter-spacing: 0; color: var(--text); }
.admin-stat-label { margin-top: 2px; color: var(--text-2); font-size: 12px; font-weight: 500; }
.admin-stat-sub { margin-top: 2px; color: var(--text-4); font-size: 11px; }
.admin-sheets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s3);
}
.admin-sheet {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s3);
}
.admin-sheet-head { margin-bottom: var(--s2); }
.admin-minirows { display: grid; gap: var(--s1); }
.admin-minirows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  color: var(--text-3);
  font-size: 12px;
}
.admin-minirows b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.admin-users { margin-top: var(--s5); }
.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.admin-section-head h2 { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.admin-search {
  width: min(320px, 100%);
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}
.admin-search svg { width: 15px; height: 15px; color: var(--text-4); flex: 0 0 auto; }
.admin-search .input { border: 0; height: 36px; padding: 0; flex: 1; }
.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 840px; }
.admin-table th {
  text-align: left;
  padding: var(--s3);
  color: var(--text-4);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.admin-table td {
  padding: var(--s3);
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  vertical-align: top;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-user-main { display: grid; gap: 2px; min-width: 180px; }
.admin-user-main b { color: var(--text); font-size: 13px; font-weight: 600; }
.admin-user-main span, .admin-user-main small, .admin-code { color: var(--text-4); }
.admin-empty, .admin-loading {
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-3);
  text-align: center;
}
.admin-empty.compact { padding: var(--s3); text-align: left; }
.admin-detail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  min-height: 100%;
  padding: var(--s5) var(--s4);
}
.admin-detail-head h2 { font-size: 22px; font-weight: 650; letter-spacing: 0; }
.admin-detail-head p:not(.eyebrow) { color: var(--text-3); margin-top: var(--s1); }
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}
.admin-controls {
  display: grid;
  gap: var(--s2);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.admin-controls label { display: grid; gap: var(--s1); color: var(--text-3); font-size: 12px; }
.admin-check { display: flex !important; align-items: center; gap: var(--s2); grid-template-columns: none; }
.admin-plan-row { display: flex; gap: var(--s3); align-items: flex-end; flex-wrap: wrap; }
.admin-plan-row label:first-child { flex: 1; min-width: 180px; }
.admin-control-row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.admin-danger-row { display: flex; gap: var(--s2); flex-wrap: wrap; padding-top: var(--s2); border-top: 1px solid var(--line); margin-top: var(--s1); }
.admin-detail-section { display: grid; gap: var(--s2); }
.admin-detail-row {
  display: grid;
  gap: 2px;
  padding: var(--s2) 0;
  border-bottom: 1px solid var(--line);
}
.admin-detail-row b { color: var(--text); font-size: 13px; font-weight: 550; }
.admin-detail-row span { color: var(--text-3); font-size: 12px; }
.admin-detail-row small { color: var(--text-4); font-size: 11px; overflow-wrap: anywhere; }
.admin-entry { margin-top: var(--s3); }
@media (max-width: 720px) {
  .admin-section-head { align-items: stretch; flex-direction: column; }
  .admin-diagnostics-head { flex-direction: column; }
  .admin-diagnostic-grid { grid-template-columns: 1fr; }
  .admin-detail-grid { grid-template-columns: 1fr; }
}

/* ══ PERSISTENT PLAYER DOCK ───────────────────── */
/* Lives outside the sheet so the live <iframe>/<audio> survives the card
   collapsing. Floating mini-bar by default; becomes the open card's footer
   (".expanded") pinned to the sheet's right column. */
#playerDock {
  position: fixed; z-index: 103;
  right: 16px; bottom: 16px;
  width: 360px; max-width: calc(100vw - 32px);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  overflow: hidden;
  transform: translateY(160%); opacity: 0; pointer-events: none;
  transition: transform 420ms var(--sheet), opacity 260ms var(--ease),
              width 380ms var(--sheet), right 380ms var(--sheet),
              bottom 380ms var(--sheet), border-radius 320ms var(--ease);
}
#playerDock.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
#playerDock.sheet-hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
#playerDock.expanded {
  right: 0; bottom: 0; width: 420px; max-width: 92vw;
  border-radius: 0; border-right: 0; border-bottom: 0;
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -22px 60px rgba(0,0,0,0.5);
}

.pdock-bar { display: flex; align-items: center; gap: var(--s3); padding: 10px; }
#playerDock.expanded.has-embed .pdock-bar { display: none; }

.pdock-art {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--r-sm);
  overflow: hidden; border: 1px solid var(--line); background: var(--surface);
  padding: 0; cursor: pointer; display: grid; place-items: center;
  transition: transform 120ms var(--ease);
}
.pdock-art:hover { transform: scale(1.04); }
.pdock-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdock-art .vinyl { width: 30px; height: 30px; }

.pdock-info { flex: 1; min-width: 0; cursor: pointer; }
.pdock-title { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdock-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pdock-btn {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  cursor: pointer; display: grid; place-items: center;
  transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease);
}
.pdock-btn:hover { background: var(--surface-4); color: var(--text); border-color: var(--line-3); }
.pdock-btn svg { width: 15px; height: 15px; }
.pdock-pp { background: var(--accent); border-color: transparent; color: #fff; }
.pdock-pp:hover { background: var(--accent-d); color: #fff; border-color: transparent; }
.pdock-pp svg { width: 16px; height: 16px; }
/* Embeds carry their own transport controls — hide our play/pause for them. */
#playerDock.kind-embed .pdock-pp { display: none; }

/* live equalizer, only while playing */
.pdock-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; width: 17px; flex: 0 0 auto; }
#playerDock.playing .pdock-eq { display: inline-flex; }
.pdock-eq i { width: 3px; height: 3px; background: var(--accent); border-radius: 2px; animation: pdockEq 900ms var(--ease) infinite; }
.pdock-eq i:nth-child(1) { animation-delay: -200ms; }
.pdock-eq i:nth-child(2) { animation-delay: -560ms; }
.pdock-eq i:nth-child(3) { animation-delay: -80ms; }
.pdock-eq i:nth-child(4) { animation-delay: -380ms; }
@keyframes pdockEq { 0%,100% { height: 3px; } 50% { height: 14px; } }

/* embed area — collapsed to 0 in mini, revealed only when expanded */
.pdock-embed { height: 0; overflow: hidden; background: var(--bg-elev); }
#playerDock.expanded.has-embed .pdock-embed { height: auto; padding: 0; }
#playerDock.expanded.has-embed .pdock-embed iframe { display: block; width: 100%; border: 0; }

@media (max-width: 880px) {
  #playerDock { right: 12px; bottom: 84px; width: calc(100vw - 24px); }
  #playerDock.expanded { right: 0; bottom: 0; width: 100%; max-width: 100%; }
}

/* ══ LIBRARY ══════════════════════════════════ */
.lib-stat-accent { color: var(--accent); }

.lib-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s5);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
}

.lib-toolbar-left,
.lib-toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  min-width: 0;
}

.lib-toolbar-left { flex: 1 1 560px; }
.lib-toolbar-right { justify-content: flex-end; margin-left: auto; }

.lib-add-search {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex: 1 1 460px;
  min-width: 0;
}

.lib-toolbar-search {
  width: min(420px, 100%);
  flex: 1 1 280px;
}

.lib-inline-add {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  min-height: var(--s6);
}

.lib-inline-add[hidden] { display: none; }

.lib-add-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  white-space: nowrap;
}

.lib-add-inline-btn[hidden] { display: none; }
.lib-attention-toggle.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--text);
}
.lib-attention-label { white-space: nowrap; }

.lib-progress {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.lib-progress-text {
  min-width: 130px;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.lib-prog-track {
  width: 120px;
  height: var(--s1);
  background: var(--surface-4);
  border-radius: var(--r-xs);
  overflow: hidden;
}

.lib-prog-fill {
  height: 100%;
  width: 0%;
  background: var(--ok);
  border-radius: var(--r-xs);
  transition: width 300ms var(--ease);
}

.lib-prog-fill-accent { background: var(--accent); }

.lib-upload-wrap {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.lib-upload-btn,
#libSyncIdentities {
  cursor: pointer;
  min-height: var(--s6);
  display: inline-flex;
  align-items: center;
}

.lib-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: start; }
.lib-split > div { min-width: 0; }
.lib-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.lib-col-title { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.lib-col-head h2 { font-size: 16px; font-weight: 600; }
.lib-col-head .ct { font-family: var(--mono); font-size: 11px; color: var(--text-4); }
.lib-sort-btn { font-family: var(--mono); font-size: 11px; padding-inline: var(--s2); }

.lib-empty-state {
  padding: var(--s6) var(--s5);
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  margin-top: var(--s2);
}

.lib-empty-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: var(--s1);
}

.lib-empty-sub {
  font-size: 12px;
  color: var(--text-4);
}

.lib-row {
  display: flex; align-items: center; gap: var(--s3); padding: 11px 10px; border-radius: var(--r-sm);
  cursor: pointer; position: relative; user-select: none;
  transition: background 140ms var(--ease);
}
.lib-row:hover { background: rgba(255,255,255,0.03); }
.lib-row.sel { background: var(--accent-ghost); }
.lib-row.flash { animation: rowFlash 600ms var(--ease); }
@keyframes rowFlash { 0% { background: rgba(78,192,126,0.18); } 100% { background: transparent; } }
.lib-row.adding { animation: rowAdd 460ms var(--spring); }
@keyframes rowAdd { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
.lib-check { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 4px; border: 1.5px solid var(--line-3); display: grid; place-items: center; opacity: 0; transition: opacity 140ms var(--ease); }
.lib-row:hover .lib-check, .lib-row.sel .lib-check { opacity: 1; }
.lib-row.sel .lib-check { background: var(--accent); border-color: var(--accent); }
.lib-check svg { width: 10px; height: 10px; color: #fff; opacity: 0; }
.lib-row.sel .lib-check svg { opacity: 1; }
.lib-name { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* status chip sits at a consistent right-aligned column */
.lib-status { flex: 0 0 auto; }
.lib-name .prov { display: inline-flex; vertical-align: -2px; margin-left: 6px; width: 13px; height: 13px; opacity: 0.7; }
.lib-edit-btn { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 99px; border: none; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: all 140ms var(--ease); padding: 0; margin-left: auto; }
.lib-row:hover .lib-edit-btn, .lib-row.expanded .lib-edit-btn { opacity: 1; }
.lib-edit-btn:hover { background: var(--accent); color: #fff; }
.lib-edit-btn svg { width: 14px; height: 14px; }
.lib-del-btn { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 99px; border: none; background: transparent; color: var(--text-4); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: all 140ms var(--ease); padding: 0; }
.lib-row:hover .lib-del-btn, .lib-row.expanded .lib-del-btn { opacity: 1; }
.lib-del-btn:hover { background: var(--err); color: #fff; }
.lib-del-btn svg { width: 12px; height: 12px; }
.lib-spark { width: 64px; height: 22px; flex: 0 0 64px; margin-left: auto; }
.lib-spark polyline { transition: stroke 200ms var(--ease); }
.lib-row:hover .lib-spark polyline { stroke: var(--accent); }
.lib-status { flex: 0 0 auto; }

/* bulk action bar */
.bulkbar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-height: 0;
  margin-bottom: 0;
  padding: 0 var(--s4);
  overflow: hidden;
  opacity: 0;
  background: var(--surface-3);
  border: 0 solid var(--accent-line);
  border-radius: var(--r-md);
  transition:
    max-height 280ms var(--sheet),
    opacity 220ms var(--ease),
    padding 240ms var(--ease),
    margin-bottom 240ms var(--ease),
    border-width 240ms var(--ease);
}
.bulkbar.show {
  max-height: 60px;
  margin-bottom: var(--s4);
  padding: 10px var(--s4);
  opacity: 1;
  border-width: 1px;
}
.bulkbar .ct { font-size: 13px; font-weight: 600; color: var(--text); }
.bulkbar .sep { width: 1px; height: 20px; background: var(--line-2); }

@media (max-width: 880px) {
  .lib-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .lib-toolbar-left,
  .lib-toolbar-right {
    width: 100%;
  }
  .lib-toolbar-right { justify-content: flex-start; }
  .lib-add-search {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .lib-inline-add {
    width: 100%;
  }
  .lib-inline-add .btn {
    flex: 1 1 0;
    justify-content: center;
  }
  .lib-toolbar-left .search {
    flex: 1;
    width: auto;
  }
  .lib-split { grid-template-columns: 1fr; gap: var(--s5); }
}

@media (prefers-reduced-motion: reduce) {
  .bulkbar,
  .lib-prog-fill {
    transition: none;
  }
}

/* Ambiguous "Resolve ›" chip — looks interactive */
.lib-row .chip.warn {
  cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
  user-select: none;
}
.lib-row .chip.warn:hover {
  background: rgba(var(--warn-rgb, 214,162,92), 0.18);
  border-color: rgba(214,162,92,0.55);
}

/* Resolve dialog option rows */
.resolve-opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease);
}
.resolve-opt:hover { border-color: var(--line-3); background: rgba(255,255,255,0.02); }
.resolve-opt.sel { border-color: var(--accent-line); background: var(--accent-ghost); }
.resolve-art { width: 44px; height: 44px; flex-shrink: 0; border-radius: 7px; background: var(--surface-3); overflow: hidden; }
.resolve-check { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent); opacity: 0; transition: opacity 160ms var(--ease); }
.resolve-check svg { width: 18px; height: 18px; }
.resolve-opt.sel .resolve-check { opacity: 1; }

/* ══ PURCHASE LIST (single-column list) ────────── */
.pl-search { width: min(300px, 100%); }
.pl-cols { width: 100%; max-width: none; }
.pl-col { display: flex; flex-direction: column; min-height: 120px; border-radius: var(--r-lg); transition: background 160ms var(--ease); }
.pl-col-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.pl-col-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pl-col-head h2 { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pl-col-head .ct { font-family: var(--mono); font-size: 11px; color: var(--text-4); margin-left: auto; }
.pl-list { display: flex; flex-direction: column; gap: var(--s2); min-height: 60px; }
.pl-item {
  display: grid;
  grid-template-columns: 56px minmax(220px, 1fr) minmax(280px, auto) auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease), opacity 140ms var(--ease), transform 140ms var(--ease);
  user-select: none;
}
.pl-item:hover { border-color: var(--line-2); background: var(--surface-2); }
.pl-item.in { animation: rowAdd 400ms var(--spring); }
.pl-item.expanded { border-color: var(--accent-line); border-radius: var(--r-sm) var(--r-sm) 0 0; }
.pl-item-detail {
  display: none;
  padding: 0 var(--s3) var(--s3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  margin-top: -1px;
  margin-bottom: var(--s2);
}
.pl-item-detail.show { display: block; }
.pl-item-detail-inner {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}
.pl-item-detail-art,
.pl-player-art {
  border-radius: var(--r-sm);
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}
.pl-item-detail-art { width: 84px; height: 84px; }
.pl-item-detail-meta { min-width: 0; }
.pl-item-detail-artist { font-size: 15px; font-weight: 600; }
.pl-item-detail-title { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.pl-item-detail-desc { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }
.pl-item-detail-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: 10px; }
.pl-thumb { width: 56px; height: 56px; border-radius: var(--r-sm); overflow: hidden; position: relative; }
.pl-thumb img,
.pl-item-detail-art img,
.pl-player-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pl-art-bg { position: absolute; inset: 0; }
.pl-meta { min-width: 0; }
.pl-a { font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-t { font-size: 13px; color: var(--text-2); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.pl-m { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 5px; }
.pl-sources { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: 8px; }
.pl-row-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--s1); min-width: 0; }
.pl-source-link { gap: var(--s1); }
.pl-source-link.ghost { color: var(--text-3); border-color: var(--line); }
.pl-link-kind { font-family: var(--mono); font-size: 9px; color: var(--text-4); text-transform: uppercase; }
.pl-bp { font-family: var(--mono); font-size: 11px; font-weight: 700; }
.pl-acts { display: flex; gap: var(--s1); flex-shrink: 0; }
.pl-action { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 99px; border: 1px solid transparent; background: transparent; color: var(--text-3); cursor: pointer; display: grid; place-items: center; transition: background 140ms var(--ease), color 140ms var(--ease), border-color 140ms var(--ease); }
.pl-action:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.pl-action.on { color: var(--accent); background: var(--accent-ghost); border-color: var(--accent-line); }
.pl-del:hover { background: var(--err); color: var(--accent-ink); border-color: transparent; }
.pl-action svg { width: 14px; height: 14px; }
.pl-del svg { width: 12px; height: 12px; }
.pl-empty { padding: 18px; text-align: center; color: var(--text-4); font-size: 12px; border: 1px dashed var(--line); border-radius: var(--r-sm); }
.pl-player-sheet { position: relative; padding: var(--s4) 0 var(--s2); }
.pl-player-head { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s4); align-items: center; margin-bottom: var(--s4); }
.pl-player-art { width: 112px; height: 112px; border-radius: var(--r-md); }
.pl-player-title h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 2px 0; }
.pl-player-title p { color: var(--text-2); }
.pl-player-meta { margin-top: var(--s2); font-size: 12px; color: var(--text-3); line-height: 1.5; }
.pl-player-links { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.pl-player-empty { color: var(--text-3); font-size: 13px; padding: var(--s3) 0; }
.pl-player-tracks { margin-top: var(--s3); }

@media (max-width: 1040px) {
  .pl-item { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .pl-row-links { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 720px) {
  .pl-item { grid-template-columns: 48px minmax(0, 1fr); align-items: start; }
  .pl-thumb { width: 48px; height: 48px; }
  .pl-row-links,
  .pl-acts {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .pl-item-detail-inner,
  .pl-player-head {
    grid-template-columns: 1fr;
  }
}

/* ══ SETTINGS ═════════════════════════════════ */
.set-layout { display: grid; grid-template-columns: 200px 1fr; gap: var(--s7); align-items: start; }
@media (max-width: 880px) { .set-layout { grid-template-columns: 1fr; gap: var(--s5); } }
.set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.set-nav-item { display: flex; align-items: center; gap: var(--s3); padding: 9px 12px; border-radius: var(--r-sm); color: var(--text-3); cursor: pointer; font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: all 140ms var(--ease); }
.set-nav-item svg { width: 17px; height: 17px; stroke-width: 1.7; }
.set-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.set-nav-item.active { color: var(--text); background: var(--accent-ghost); }
@media (max-width: 880px) { .set-nav { flex-direction: row; overflow-x: auto; position: static; gap: 6px; } .set-nav-item span { display: none; } }

.set-section { display: none; }
.set-section.active { display: block; animation: viewEnter 240ms var(--ease) both; }
.set-block { margin-bottom: var(--s6); }
.set-block h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.set-block .desc { color: var(--text-3); font-size: 13px; margin-bottom: var(--s4); }

.conn-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--s2); }
.conn-logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r-sm); display: grid; place-items: center; }
.conn-meta { flex: 1; }
.conn-name { font-size: 14px; font-weight: 600; }
.conn-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.conn-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.bc-email-form { margin: var(--s3) 0 var(--s5); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bc-email-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.bc-email-grid .wide { grid-column: 1 / -1; }
.bc-email-field label { display: block; margin-bottom: var(--s1); color: var(--text-3); font-size: 11px; }
.bc-email-field .input { width: 100%; }
.bc-field-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s1); }
.bc-field-head label { margin-bottom: 0; }
.bc-help-link { color: var(--accent); font-size: 11px; text-decoration: none; white-space: nowrap; }
.bc-help-link:hover { color: var(--accent-h); }
.bc-help-link.muted { color: var(--text-4); }
.bc-provider-hint { color: var(--text-3); font-size: 12px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.bc-server-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: var(--s3); }
.bc-email-checks { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; margin-top: var(--s3); }
.bc-email-checks label { display: inline-flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: 12px; }
.bc-email-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }
.bc-email-result { min-height: 18px; color: var(--text-3); font-size: 12px; }
@media (max-width: 720px) {
  .bc-email-grid { grid-template-columns: 1fr; }
  .bc-server-row { grid-template-columns: 1fr; }
  .conn-actions { justify-content: flex-start; }
}
.bc-import-page h1 i { font-family: var(--serif); font-style: italic; color: var(--accent); font-weight: 400; }
.bc-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: var(--s5); align-items: start; }
.bc-page-status { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bc-page-logo { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent); }
.bc-page-logo svg { width: 24px; height: 24px; }
.bc-page-status-main { flex: 1; min-width: 0; }
.bc-page-status-title { font-size: 15px; font-weight: 600; }
.bc-page-status-copy,
.bc-page-status-warn,
.bc-page-note { color: var(--text-3); font-size: 12px; margin-top: var(--s1); }
.bc-page-status-warn,
.bc-page-note.warn { color: var(--warn); }
.bc-page-status-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: flex-end; }
.bc-page-note { padding: var(--s3) 0; }
.bc-scope-card,
.bc-detail-block { margin-top: var(--s3); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bc-scope-card p { color: var(--text-3); font-size: 12.5px; margin-top: var(--s2); }
.bc-scope-card b { color: var(--text); font-weight: 500; }
.bc-section-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.bc-section-title span { font-size: 13px; font-weight: 600; }
.bc-section-title strong { color: var(--text-3); font-family: var(--mono); font-size: 10.5px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; }
.bc-import-panel { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bc-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s4); }
.bc-panel-head h2 { font-size: 16px; font-weight: 600; }
.bc-panel-head p:not(.eyebrow) { max-width: 220px; color: var(--text-3); font-size: 12px; }
.bc-result-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.bc-stored-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-result-stat { padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.bc-detail-block .bc-result-stat { background: var(--surface-2); }
.bc-result-stat span { display: block; color: var(--text-3); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; }
.bc-result-stat strong { display: block; margin-top: var(--s1); font-size: 18px; line-height: 1.15; font-weight: 600; overflow-wrap: anywhere; }
.bc-import-list { display: grid; gap: var(--s2); }
.bc-import-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.bc-import-row-main { flex: 1; min-width: 0; }
.bc-import-row-main strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-import-row-main span { color: var(--text-2); font-size: 12px; }
.bc-import-row-main small { display: block; margin-top: var(--s1); color: var(--text-4); font-size: 11px; }
.bc-empty-list { color: var(--text-3); font-size: 12px; padding: var(--s3); border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
@media (max-width: 980px) {
  .bc-page-grid { grid-template-columns: 1fr; }
  .bc-panel-head { display: block; }
  .bc-panel-head p:not(.eyebrow) { max-width: none; margin-top: var(--s2); }
}
@media (max-width: 720px) {
  .bc-page-status { align-items: flex-start; flex-wrap: wrap; }
  .bc-page-status-actions { justify-content: flex-start; width: 100%; }
  .bc-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bc-import-row { align-items: flex-start; flex-direction: column; }
}

.set-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; }
.set-row-meta .t { font-size: 13.5px; font-weight: 500; }
.set-row-meta .d { font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* spring toggle */
.toggle { width: 42px; height: 24px; flex: 0 0 42px; border-radius: 99px; background: var(--surface-4); border: 1px solid var(--line-2); cursor: pointer; position: relative; transition: background 200ms var(--ease); }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 320ms var(--spring); box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.toggle.on { background: var(--accent); border-color: transparent; }
.toggle.on::after { transform: translateX(18px); }

/* danger zone */
.danger { border: 1px solid var(--err-bg); border-radius: var(--r-md); padding: var(--s4); margin-top: var(--s5); }
.danger h3 { color: var(--err); }
.danger-confirm { margin-top: var(--s4); display: none; gap: var(--s2); align-items: center; }
.danger-confirm.show { display: flex; animation: viewEnter 200ms var(--ease) both; }
.danger-confirm .input { max-width: 200px; }
.btn-danger { background: var(--err-bg); border-color: rgba(240,98,110,0.3); color: var(--err); }
.btn-danger:hover { background: var(--err); color: #fff; border-color: transparent; }

/* ══ TWEAKS host panel offset ─────────────────── */
.tw-note { font-size: 11px; }

/* Apple Music artist search in library detail */
.lib-am-search { margin-top: 2px; }
.lib-am-toggle { display: flex; align-items: center; gap: 4px; border: none; background: transparent; color: var(--text-3); font-size: 11px; cursor: pointer; padding: 4px 0; transition: color 140ms var(--ease); }
.lib-am-toggle:hover { color: var(--accent); }
.lib-am-chev { width: 12px; height: 12px; display: grid; place-items: center; }
.lib-am-chev svg { width: 10px; height: 10px; }
.lib-am-results { display: none; padding: 6px 0; }
.lib-am-match { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; transition: background 140ms var(--ease); }
.lib-am-match:hover { background: var(--surface-2); }
.lib-am-match + .lib-am-match { margin-top: 2px; }
.lib-am-art { width: 32px; height: 32px; border-radius: 99px; background: var(--surface-3); background-size: cover; background-position: center; flex-shrink: 0; }
.lib-am-meta { min-width: 0; }
.lib-am-name { font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-am-genre { font-size: 10px; color: var(--text-4); margin-top: 1px; }

/* ══ ARTIST DISCOGRAPHY ═══════════════════════ */
.artist-avatar {
  width: 64px; height: 64px; flex: 0 0 64px; border-radius: var(--r-lg);
  background: var(--surface-3); background-size: cover; background-position: center;
  display: grid; place-items: center; overflow: hidden;
  border: 1px solid var(--line);
}
.artist-avatar-i { font-size: 26px; font-weight: 600; color: var(--text-3); letter-spacing: -0.02em; }
#artistGrid .rel-group:first-child { margin-top: var(--s2); }

/* "View releases" affordance on library rows */
.lib-disc-btn {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 99px; border: none;
  background: transparent; color: var(--text-3); cursor: pointer;
  display: grid; place-items: center; opacity: 0; padding: 0; margin-left: auto;
  transition: all 140ms var(--ease);
}
.lib-row:hover .lib-disc-btn, .lib-row.expanded .lib-disc-btn { opacity: 1; }
.lib-disc-btn:hover { background: var(--accent); color: #fff; }
.lib-disc-btn svg { width: 15px; height: 15px; }
/* once a disc button claims margin-left:auto, the edit/del buttons sit flush after it */
.lib-row .lib-disc-btn ~ .lib-edit-btn { margin-left: 0; }

/* artist/label in eyebrow are now clickable via `.eyebrow a` above */

/* ══ AUTH HINT ════════════════════════════════ */
.auth-hint { font-size: 11.5px; color: var(--text-4); margin: -12px 0 14px; }

/* ══ APPLE MUSIC SYNC PAGE ════════════════════ */
.apple-sync-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s5); }
.apple-sync-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); background: var(--surface); }
.apple-sync-card h3 { display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.apple-sync-card h3 svg { width: 17px; height: 17px; opacity: 0.7; }
.apple-sync-status { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; min-height: 24px; }
.apple-sync-result { margin-top: 10px; }
.am-queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.am-queue-card { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); cursor: default; }
.am-queue-art { position: relative; aspect-ratio: 1; overflow: hidden; }
.am-queue-art-bg { position: absolute; inset: 0; }
.am-queue-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 300ms var(--ease); }
.am-queue-art img.loaded { opacity: 1; }
.am-queue-cap { padding: 7px 8px 8px; }
.am-queue-cap .a { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--text-2); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.am-queue-cap .a span { color: var(--text-4); }
.am-queue-cap .d { font-family: var(--mono); font-size: 9px; color: var(--text-4); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-queue-remove { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 99px; border: none; cursor: pointer; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); color: rgba(255,255,255,0.8); display: grid; place-items: center; opacity: 0; transition: opacity 140ms var(--ease), background 120ms var(--ease); }
.am-queue-remove svg { width: 12px; height: 12px; stroke-width: 2.5; }
.am-queue-card:hover .am-queue-remove { opacity: 1; }
.am-queue-remove:hover { background: var(--err) !important; color: #fff; }
.am-queue-unknown { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.am-queue-unknown span { font-family: var(--mono); font-size: 10px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-block-head { margin-bottom: var(--s3); }

/* ══ LABEL DETAIL VIEW ════════════════════════ */
.lbl-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.lbl-window-chip { font-size: 10px; color: var(--text-4); background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.lbl-fetch-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 20px 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.lbl-fetch-msg { font-size: 12px; color: var(--text-3); text-align: center; max-width: 380px; }
.lbl-fetch-status {
  width: min(100%, 420px);
  display: grid;
  gap: var(--s1);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  text-align: center;
}
.lbl-fetch-status-main { font-size: 13px; font-weight: 550; color: var(--text); }
.lbl-fetch-status-meta { font-family: var(--mono); font-size: 11px; color: var(--text-3); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .lbl-sync-main svg { animation: none; }
}
