:root {
  /* Dark UI: near-black base, cards slightly lifted, pink → peach CTA gradient */
  --bg: #121212;
  --panel: #1c1c1c;
  --elevated: #282828;
  --border: #333333;
  --text: #ffffff;
  --muted: #a0a0a0;
  --sidebar-w: 260px;
  /* Studio: fixed strip width (flush with main sidebar, not main-content cards) */
  --studio-settings-sidebar-w: 318px;
  --player-h: 72px;
  /* Main column: scales on wide viewports (was fixed 920px — caused huge side gutters) */
  --content-max: 1680px;
  --content-pad-x: clamp(1rem, 2.2vw, 2.75rem);
  --yellow: #ff9f5a;
  --yellow-bright: #ffb088;
  --orange: #ff8a6a;
  --orange-deep: #ff6b8a;
  --red-orange: #ff4b8b;
  --red-deep: #e8487c;
  --accent-orange: #ff9f5a;
  --accent-pink: #ff4b8b;
  --accent: #ff9f5a;
  --gradient: linear-gradient(118deg, #ff4b8b 0%, #ff6b8a 32%, #ff8a6a 68%, #ff9f5a 100%);
  /* Horizontal: pill buttons — avoids diagonal banding on short chips */
  --gradient-h: linear-gradient(90deg, #ff4b8b 0%, #ff9f5a 100%);
  --font: "Inter", system-ui, sans-serif;
  --dropdown: #1c1c1c;
}

html[data-theme="light"] {
  --bg: #f4f4f5;
  --panel: #ffffff;
  --elevated: #ececf0;
  --border: #d4d4d8;
  --text: #121212;
  --muted: #57534e;
  --dropdown: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
}

.hidden {
  display: none !important;
}

/* ——— Auth ——— */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) clamp(1rem, 3vw, 2rem) calc(1.75rem + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: radial-gradient(ellipse 90% 55% at 50% 0%, rgba(255, 75, 139, 0.14), transparent 55%),
    var(--bg);
}

body.logged-out .auth-overlay {
  display: flex;
}

body:not(.logged-out) .auth-overlay {
  display: none;
}

.auth-flow {
  width: 100%;
  max-width: min(98vw, 1180px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}

.auth-site-footer {
  margin-top: 0.5rem;
  padding-top: 1.5rem;
  padding-bottom: 0.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.auth-site-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

body.auth-modal-open {
  overflow: hidden;
}

.auth-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) clamp(1rem, 3vw, 1.5rem)
    max(1rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: none;
}

.auth-modal-shell:not(.hidden) {
  pointer-events: auto;
}

.auth-modal-shell.hidden {
  display: none !important;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.auth-modal-shell .auth-card--modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(calc(100dvh - 2rem), calc(100vh - 2rem));
  overflow-y: auto;
  margin: 0;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.welcome-landing {
  padding: 0;
  width: 100%;
}

.welcome-hero-layout {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(2.25rem, 5vw, 3.25rem);
  width: 100%;
}

.welcome-copy {
  text-align: center;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(1.35rem, 3.5vw, 2rem);
}

@media (min-width: 768px) {
  .welcome-copy {
    max-width: min(52rem, 94vw);
    gap: clamp(1.55rem, 3.8vw, 2.35rem);
  }
}

@media (min-width: 1100px) {
  .welcome-copy {
    max-width: min(58rem, 96vw);
    gap: clamp(1.65rem, 3.2vw, 2.5rem);
  }
}

.welcome-visual {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 20px;
  background: linear-gradient(165deg, var(--elevated) 0%, var(--panel) 45%, var(--panel) 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 56px rgba(0, 0, 0, 0.45);
  padding: 1.35rem clamp(1rem, 3vw, 2rem) 1.5rem;
  overflow: hidden;
  position: relative;
}

.welcome-visual::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(255, 75, 139, 0.16), transparent 70%);
  pointer-events: none;
}

.welcome-visual-trio {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 900px) {
  .welcome-visual-trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    align-items: stretch;
  }
}

@media (min-width: 1100px) {
  .welcome-visual-trio {
    gap: 1.15rem 1.35rem;
  }
}

.welcome-demo-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

html[data-theme="light"] .welcome-demo-card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.welcome-demo-card__head {
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .welcome-demo-card__head {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}

.welcome-demo-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}

.welcome-demo-card__desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.welcome-demo-card__body {
  padding: 0.75rem 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.welcome-demo-card__lane-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.welcome-wave-wrap {
  position: relative;
  border-radius: 10px;
  padding: 0.45rem 0.4rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .welcome-wave-wrap {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

.welcome-wave-wrap--demo {
  min-height: 0;
}

.welcome-wave-wrap--daw {
  padding: 0;
  background: transparent;
  border: none;
}

.welcome-daw {
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
  width: 100%;
  min-height: 74px;
}

.welcome-daw__db-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.05rem 0 0.32rem;
  width: 1.4rem;
  flex-shrink: 0;
  font-size: 0.56rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  line-height: 1;
  opacity: 0.82;
}

.welcome-daw__viewport-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.welcome-daw__bar-ruler {
  display: flex;
  justify-content: space-between;
  padding: 0 0.25rem 0 0.05rem;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  opacity: 0.72;
}

.welcome-daw__viewport {
  position: relative;
  flex: 1;
  min-height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.welcome-daw__viewport--raster {
  padding: 0;
  background: #080808;
  border-color: rgba(255, 255, 255, 0.12);
}

.welcome-daw__grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.42;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(192, 132, 252, 0.07) 18px, rgba(192, 132, 252, 0.07) 19px),
    repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(167, 139, 250, 0.055) 10px, rgba(167, 139, 250, 0.055) 11px);
  pointer-events: none;
}

.welcome-daw__zero-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 2;
  height: 1px;
  margin-top: -0.5px;
  background: linear-gradient(90deg, transparent, rgba(232, 121, 249, 0.5) 15%, rgba(168, 85, 247, 0.85) 50%, rgba(244, 114, 182, 0.55) 85%, transparent);
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
  pointer-events: none;
}

.welcome-daw__wave-img {
  position: absolute;
  inset: 0.35rem 0.25rem;
  width: calc(100% - 0.5rem);
  height: calc(100% - 0.7rem);
  object-fit: fill;
  z-index: 1;
  pointer-events: none;
  animation: welcomeDawTraceBreathe 2.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(232, 121, 249, 0.45)) drop-shadow(0 0 14px rgba(168, 85, 247, 0.25));
}

.welcome-daw__wave-img--vox {
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.4)) drop-shadow(0 0 12px rgba(192, 132, 252, 0.3));
}

.welcome-daw__photo {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 54px;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.98;
  animation: welcomeDawPhotoNudge 3.2s ease-in-out infinite;
  position: relative;
  z-index: 0;
}

.welcome-daw__photo-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(168, 85, 247, 0.22) 0%, rgba(244, 114, 182, 0.12) 45%, rgba(99, 102, 241, 0.18) 100%);
  mix-blend-mode: color;
  opacity: 0.92;
}

@keyframes welcomeDawTraceBreathe {
  0%,
  100% {
    opacity: 0.82;
  }
  50% {
    opacity: 1;
  }
}

@keyframes welcomeDawPhotoNudge {
  0%,
  100% {
    opacity: 0.96;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.012);
  }
}

.welcome-scrubber--daw {
  z-index: 4;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: linear-gradient(180deg, #fae8ff 0%, #d8b4fe 35%, #a855f7 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 16px rgba(168, 85, 247, 0.75),
    0 0 28px rgba(236, 72, 153, 0.35);
}

/* Playhead: different speed + delay per card so they never stay in sync */
.welcome-demo-card[data-welcome-demo="stems"] .welcome-scrubber--daw {
  animation-name: welcomeScrub;
  animation-duration: 4.1s;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  animation-delay: 0s;
  animation-iteration-count: infinite;
}

.welcome-demo-card[data-welcome-demo="drums"] .welcome-scrubber--daw {
  animation-name: welcomeScrub;
  animation-duration: 5.6s;
  animation-timing-function: cubic-bezier(0.35, 0.05, 0.4, 1);
  animation-delay: -2.1s;
  animation-iteration-count: infinite;
  background: linear-gradient(180deg, #fdf4ff 0%, #f0abfc 40%, #c026d3 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 18px rgba(192, 38, 211, 0.65),
    0 0 32px rgba(244, 114, 182, 0.3);
}

.welcome-demo-card[data-welcome-demo="vocals"] .welcome-scrubber--daw {
  animation-name: welcomeScrub;
  animation-duration: 3.25s;
  animation-timing-function: cubic-bezier(0.5, 0, 0.5, 1);
  animation-delay: -0.85s;
  animation-iteration-count: infinite;
  background: linear-gradient(180deg, #eef2ff 0%, #a5b4fc 45%, #6366f1 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0 16px rgba(99, 102, 241, 0.7),
    0 0 26px rgba(129, 140, 248, 0.35);
}

html[data-theme="light"] .welcome-daw__viewport:not(.welcome-daw__viewport--raster) {
  background: #252830;
  border-color: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .welcome-daw__viewport--raster {
  background: #1a1a1c;
}

html[data-theme="light"] .welcome-daw__grid-bg {
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(0, 0, 0, 0.06) 18px, rgba(0, 0, 0, 0.06) 19px),
    repeating-linear-gradient(0deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 11px);
}

html[data-theme="light"] .welcome-daw__zero-line {
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.45) 20%, rgba(99, 102, 241, 0.75) 50%, rgba(192, 132, 252, 0.45) 80%, transparent);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.35);
}

.welcome-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
}

.welcome-bar {
  flex: 1 1 0;
  min-width: 0;
  max-height: 100%;
  border-radius: 3px;
  transform-origin: bottom;
  font-style: normal;
  --wf: 0.55;
  animation-delay: calc(var(--i) * 0.045s);
  animation-iteration-count: infinite;
}

.welcome-bar--demo-sub {
  min-height: 10%;
  animation-delay: calc(var(--i) * 0.05s);
}

@keyframes welcomeWfPulseMix {
  0%,
  100% {
    transform: scaleY(max(0.1, calc(var(--wf) * 0.58)));
    opacity: calc(0.52 + var(--wf) * 0.38);
  }
  50% {
    transform: scaleY(max(0.14, calc(var(--wf) * 0.96)));
    opacity: 1;
  }
}

@keyframes welcomeWfPulseDrums {
  0%,
  100% {
    transform: scaleY(max(0.06, calc(var(--wf) * 0.4)));
    opacity: calc(0.45 + var(--wf) * 0.48);
  }
  30% {
    transform: scaleY(max(0.1, calc(var(--wf) * 1.08)));
    opacity: 1;
  }
  55% {
    transform: scaleY(max(0.07, calc(var(--wf) * 0.35)));
    opacity: calc(0.5 + var(--wf) * 0.35);
  }
  75% {
    transform: scaleY(max(0.09, calc(var(--wf) * 0.95)));
    opacity: 1;
  }
}

@keyframes welcomeWfPulseVox {
  0%,
  100% {
    transform: scaleY(max(0.12, calc(var(--wf) * 0.62)));
    opacity: calc(0.58 + var(--wf) * 0.32);
  }
  50% {
    transform: scaleY(max(0.16, calc(var(--wf) * 0.9)));
    opacity: 1;
  }
}

.welcome-scrubber {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 16px rgba(255, 159, 90, 0.65);
  left: 8%;
  pointer-events: none;
  animation: welcomeScrub 3.4s ease-in-out infinite;
  z-index: 2;
}

.welcome-scrubber--demo {
  top: 5px;
  bottom: 5px;
  animation-duration: 2.8s;
}

@keyframes welcomeScrub {
  0%,
  100% {
    left: 6%;
    opacity: 0.85;
  }
  50% {
    left: 94%;
    opacity: 1;
  }
}

.welcome-demo-connector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0;
}

.welcome-demo-connector-line {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 75, 139, 0.4) 25%,
    rgba(255, 159, 90, 0.5) 50%,
    rgba(255, 75, 139, 0.4) 75%,
    transparent
  );
  background-size: 200% 100%;
  animation: welcomeFlowLine 2.2s linear infinite;
  opacity: 0.9;
}

@keyframes welcomeFlowLine {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.welcome-demo-connector-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.28rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
}

.welcome-demo-sublanes {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.welcome-demo-sublane {
  --welcome-stem-border-rest: rgba(255, 255, 255, 0.06);
  --welcome-stem-border-peak: rgba(255, 75, 139, 0.42);
  display: grid;
  grid-template-columns: minmax(4.25rem, 32%) 1fr;
  gap: 0.4rem;
  align-items: center;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--welcome-stem-border-rest);
  animation: welcomeStemRow 4.5s ease-in-out infinite;
}

html[data-theme="light"] .welcome-demo-sublane {
  --welcome-stem-border-rest: rgba(0, 0, 0, 0.07);
  --welcome-stem-border-peak: rgba(255, 75, 139, 0.45);
  background: rgba(0, 0, 0, 0.025);
}

.welcome-demo-card[data-welcome-demo="stems"] .welcome-demo-sublane:nth-child(1) {
  animation-delay: 0s;
}
.welcome-demo-card[data-welcome-demo="stems"] .welcome-demo-sublane:nth-child(2) {
  animation-delay: 0.1s;
}
.welcome-demo-card[data-welcome-demo="stems"] .welcome-demo-sublane:nth-child(3) {
  animation-delay: 0.2s;
}
.welcome-demo-card[data-welcome-demo="stems"] .welcome-demo-sublane:nth-child(4) {
  animation-delay: 0.3s;
}

.welcome-demo-card[data-welcome-demo="drums"] .welcome-demo-sublane:nth-child(1) {
  animation-delay: 0.05s;
}
.welcome-demo-card[data-welcome-demo="drums"] .welcome-demo-sublane:nth-child(2) {
  animation-delay: 0.15s;
}
.welcome-demo-card[data-welcome-demo="drums"] .welcome-demo-sublane:nth-child(3) {
  animation-delay: 0.25s;
}
.welcome-demo-card[data-welcome-demo="drums"] .welcome-demo-sublane:nth-child(4) {
  animation-delay: 0.35s;
}

.welcome-demo-card[data-welcome-demo="vocals"] .welcome-demo-sublane:nth-child(1) {
  animation-delay: 0.08s;
}
.welcome-demo-card[data-welcome-demo="vocals"] .welcome-demo-sublane:nth-child(2) {
  animation-delay: 0.18s;
}
.welcome-demo-card[data-welcome-demo="vocals"] .welcome-demo-sublane:nth-child(3) {
  animation-delay: 0.28s;
}
.welcome-demo-card[data-welcome-demo="vocals"] .welcome-demo-sublane:nth-child(4) {
  animation-delay: 0.38s;
}

@keyframes welcomeStemRow {
  0%,
  100% {
    border-color: var(--welcome-stem-border-rest);
  }
  42%,
  58% {
    border-color: var(--welcome-stem-border-peak);
  }
}

.welcome-demo-sublane-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.2;
}

.welcome-bars--demo-sub {
  height: 26px;
  gap: 2px;
}

/* Card 1 — stem rows: distinct shapes + mix-style motion (drum row uses transient curve) */
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #ff8ec8 0%, #ff4b8b 100%);
  animation-name: welcomeWfPulseVox;
  animation-duration: 1.05s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #ffd08a 0%, #ff9f5a 100%);
  animation-name: welcomeWfPulseDrums;
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 100%);
  animation-name: welcomeWfPulseMix;
  animation-duration: 1.25s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fde047 0%, #ca8a04 100%);
  animation-name: welcomeWfPulseMix;
  animation-duration: 1.08s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(1) { --wf: 0.42; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(2) { --wf: 0.62; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(3) { --wf: 0.88; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(4) { --wf: 0.92; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(5) { --wf: 0.86; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(6) { --wf: 0.74; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(7) { --wf: 0.55; }
.welcome-bars--demo-sub.welcome-bars--vocals .welcome-bar--demo-sub:nth-child(8) { --wf: 0.48; }

.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(1) { --wf: 0.1; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(2) { --wf: 0.07; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(3) { --wf: 0.78; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(4) { --wf: 0.09; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(5) { --wf: 0.85; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(6) { --wf: 0.11; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(7) { --wf: 0.72; }
.welcome-bars--demo-sub.welcome-bars--drums .welcome-bar--demo-sub:nth-child(8) { --wf: 0.13; }

.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(1) { --wf: 0.58; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(2) { --wf: 0.64; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(3) { --wf: 0.6; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(4) { --wf: 0.67; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(5) { --wf: 0.62; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(6) { --wf: 0.59; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(7) { --wf: 0.65; }
.welcome-bars--demo-sub.welcome-bars--bass .welcome-bar--demo-sub:nth-child(8) { --wf: 0.61; }

.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(1) { --wf: 0.44; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(2) { --wf: 0.4; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(3) { --wf: 0.56; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(4) { --wf: 0.5; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(5) { --wf: 0.54; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(6) { --wf: 0.47; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(7) { --wf: 0.52; }
.welcome-bars--demo-sub.welcome-bars--music .welcome-bar--demo-sub:nth-child(8) { --wf: 0.49; }

/* Card 2 — drum layers */
.welcome-bars--drum-kick .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fbbf77 0%, #c2410c 100%);
  animation-name: welcomeWfPulseDrums;
  animation-duration: 0.48s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

.welcome-bars--drum-snare .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fde68a 0%, #d97706 100%);
  animation-name: welcomeWfPulseDrums;
  animation-duration: 0.44s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

.welcome-bars--drum-cymbals .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #e0e7ff 0%, #818cf8 100%);
  animation-name: welcomeWfPulseMix;
  animation-duration: 0.62s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--drum-toms .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fecaca 0%, #dc2626 100%);
  animation-name: welcomeWfPulseDrums;
  animation-duration: 0.56s;
  animation-timing-function: cubic-bezier(0.45, 0, 0.2, 1);
}

.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(1) { --wf: 0.14; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(2) { --wf: 0.1; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(3) { --wf: 0.92; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(4) { --wf: 0.16; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(5) { --wf: 0.12; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(6) { --wf: 0.88; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(7) { --wf: 0.15; }
.welcome-bars--drum-kick .welcome-bar--demo-sub:nth-child(8) { --wf: 0.11; }

.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(1) { --wf: 0.22; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(2) { --wf: 0.26; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(3) { --wf: 0.88; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(4) { --wf: 0.24; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(5) { --wf: 0.9; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(6) { --wf: 0.28; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(7) { --wf: 0.2; }
.welcome-bars--drum-snare .welcome-bar--demo-sub:nth-child(8) { --wf: 0.25; }

.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(1) { --wf: 0.52; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(2) { --wf: 0.68; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(3) { --wf: 0.74; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(4) { --wf: 0.6; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(5) { --wf: 0.71; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(6) { --wf: 0.78; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(7) { --wf: 0.64; }
.welcome-bars--drum-cymbals .welcome-bar--demo-sub:nth-child(8) { --wf: 0.7; }

.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(1) { --wf: 0.18; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(2) { --wf: 0.2; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(3) { --wf: 0.48; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(4) { --wf: 0.82; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(5) { --wf: 0.44; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(6) { --wf: 0.58; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(7) { --wf: 0.36; }
.welcome-bars--drum-toms .welcome-bar--demo-sub:nth-child(8) { --wf: 0.24; }

/* Card 3 — vocal layers */
.welcome-bars--vox-lead .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fce7f3 0%, #ec4899 100%);
  animation-name: welcomeWfPulseVox;
  animation-duration: 1.18s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--vox-backing .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #ddd6fe 0%, #9333ea 100%);
  animation-name: welcomeWfPulseVox;
  animation-duration: 1.32s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--vox-doubles .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #fbcfe8 0%, #db2777 100%);
  animation-name: welcomeWfPulseMix;
  animation-duration: 0.88s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--vox-room .welcome-bar--demo-sub {
  background: linear-gradient(180deg, #a5f3fc 0%, #0891b2 100%);
  animation-name: welcomeWfPulseVox;
  animation-duration: 1.55s;
  animation-timing-function: ease-in-out;
}

.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(1) { --wf: 0.6; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(2) { --wf: 0.84; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(3) { --wf: 0.92; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(4) { --wf: 0.9; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(5) { --wf: 0.87; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(6) { --wf: 0.82; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(7) { --wf: 0.74; }
.welcome-bars--vox-lead .welcome-bar--demo-sub:nth-child(8) { --wf: 0.66; }

.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(1) { --wf: 0.46; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(2) { --wf: 0.56; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(3) { --wf: 0.64; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(4) { --wf: 0.6; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(5) { --wf: 0.54; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(6) { --wf: 0.5; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(7) { --wf: 0.57; }
.welcome-bars--vox-backing .welcome-bar--demo-sub:nth-child(8) { --wf: 0.52; }

.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(1) { --wf: 0.28; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(2) { --wf: 0.36; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(3) { --wf: 0.8; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(4) { --wf: 0.42; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(5) { --wf: 0.38; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(6) { --wf: 0.76; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(7) { --wf: 0.32; }
.welcome-bars--vox-doubles .welcome-bar--demo-sub:nth-child(8) { --wf: 0.3; }

.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(1) { --wf: 0.36; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(2) { --wf: 0.4; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(3) { --wf: 0.44; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(4) { --wf: 0.48; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(5) { --wf: 0.42; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(6) { --wf: 0.46; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(7) { --wf: 0.41; }
.welcome-bars--vox-room .welcome-bar--demo-sub:nth-child(8) { --wf: 0.39; }

@media (prefers-reduced-motion: reduce) {
  .welcome-bar,
  .welcome-scrubber,
  .welcome-demo-connector-line,
  .welcome-demo-sublane,
  .welcome-daw__wave-img,
  .welcome-daw__photo {
    animation: none !important;
  }

  .welcome-daw__wave-img,
  .welcome-daw__photo {
    opacity: 1;
    transform: none;
  }

  .welcome-bar--demo-sub {
    transform: scaleY(max(0.08, calc(var(--wf, 0.55) * 0.78)));
    opacity: calc(0.58 + var(--wf, 0.55) * 0.32);
  }

  .welcome-scrubber {
    left: 50%;
    margin-left: -1.5px;
  }

  .welcome-demo-connector-line {
    background-position: 50% 0;
  }
}

.welcome-brand {
  margin: 0;
  margin-top: clamp(0.4rem, 1.8vw, 1.1rem);
}

.logo-wordmark--hero {
  font-size: clamp(1.55rem, 4.8vw, 2.15rem);
}

.welcome-headline {
  font-size: clamp(1.75rem, 5.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.18;
  margin: 0;
  letter-spacing: -0.02em;
}

.welcome-lead {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
  margin: 0 auto;
  max-width: 34rem;
}

@media (min-width: 768px) {
  .welcome-headline {
    font-size: clamp(1.95rem, 4.5vw, 2.85rem);
  }

  .welcome-lead {
    max-width: 42rem;
    font-size: 1.08rem;
  }
}

@media (min-width: 1100px) {
  .welcome-headline {
    font-size: clamp(2.15rem, 3.5vw, 3.15rem);
    line-height: 1.15;
  }

  .welcome-lead {
    max-width: 46rem;
  }
}

.welcome-points {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 28rem;
  text-align: left;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.welcome-points li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.65rem;
}

.welcome-points li:last-child {
  margin-bottom: 0;
}

.welcome-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 10px rgba(255, 75, 139, 0.45);
}

@media (min-width: 768px) {
  .welcome-points {
    max-width: 34rem;
  }
}

@media (min-width: 1100px) {
  .welcome-points {
    max-width: 38rem;
  }
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: min(100%, 26rem);
  margin: 0 auto;
}

.welcome-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}

.btn-welcome-primary,
.btn-welcome-secondary {
  flex: 1 1 140px;
  min-width: 8.5rem;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s, border-color 0.15s;
}

.btn-welcome-primary {
  border: none;
  color: #fff;
  background: var(--gradient);
}

.btn-welcome-primary:hover {
  filter: brightness(1.08);
}

.btn-welcome-secondary {
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
}

.btn-welcome-secondary:hover {
  border-color: var(--muted);
  background: var(--panel);
}

.auth-back {
  display: block;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}

.auth-back:hover {
  color: var(--text);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Wordmark: MELODIN + pill “AI” (site accent gradient — same as CTAs) */
.logo-wordmark {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  line-height: 1;
  gap: 0.4em;
  font-family: var(--font);
}

.logo-wordmark__melodin {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  font-size: 1em;
  line-height: 1;
}

.logo-wordmark__ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.66em;
  line-height: 1;
  padding: 0.28em 0.55em 0.26em;
  margin: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 2px 12px rgba(255, 75, 139, 0.35);
}

html[data-theme="light"] .logo-wordmark__ai {
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 10px rgba(255, 75, 139, 0.28);
}

.auth-brand {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.auth-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: #3c4043;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.btn-google .google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  flex-shrink: 0;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 8px;
  background: var(--elevated);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--elevated);
  color: var(--text);
}

.auth-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

.auth-form label:first-of-type {
  margin-top: 0;
}

.auth-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.auth-error {
  color: #ff8a8a;
  font-size: 0.85rem;
  margin: 0.75rem 0 0;
}

.btn-gradient {
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
}

.btn-gradient:hover {
  filter: brightness(1.08);
}

/* ——— App shell ——— */
.app-shell {
  display: flex;
  min-height: 100vh;
  padding-bottom: var(--player-h);
}

.app-shell.hidden {
  display: none;
}

.sidebar {
  position: fixed;
  z-index: 30;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  padding: 1.25rem 0.75rem;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.22s ease;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}

.sidebar-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0 0 1.1rem;
}

.sidebar-logo {
  font-size: 1.42rem;
  min-width: 0;
  flex: 1;
}

.sidebar-collapse-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.sidebar-collapse-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .sidebar-collapse-btn {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .sidebar-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.07);
}

.sidebar-collapse-btn .sidebar-toggle-ico {
  display: block;
  flex-shrink: 0;
}

/* Desktop: collapsed = narrow icon rail (nav icons stay usable) */
@media (min-width: 769px) {
  html.sidebar-collapsed {
    --sidebar-w: 56px;
  }

  html.sidebar-collapsed .sidebar {
    align-items: center;
    padding: 0.65rem 0.3rem;
    overflow-x: hidden;
  }

  html.sidebar-collapsed .sidebar-header-row {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0 0 0.65rem;
    gap: 0.35rem;
  }

  html.sidebar-collapsed .sidebar-logo {
    display: none;
  }

  html.sidebar-collapsed .user-menu-wrap,
  html.sidebar-collapsed .btn-upgrade,
  html.sidebar-collapsed .sidebar-bg-job,
  html.sidebar-collapsed .sidebar-footer {
    display: none !important;
  }

  html.sidebar-collapsed .sidebar-nav {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.12rem;
  }

  html.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 0.48rem 0.2rem;
  }

  html.sidebar-collapsed .nav-item-label,
  html.sidebar-collapsed .nav-item-text.nav-item-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.sidebar-collapsed .nav-item {
    position: relative;
  }

  html.sidebar-collapsed .nav-badge {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    margin: 0;
    transform: scale(0.82);
    transform-origin: top right;
  }
}

@media (max-width: 768px) {
  .sidebar-collapse-btn {
    display: none !important;
  }
}

.user-menu-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .sidebar-user:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--muted);
  display: flex;
}

.user-dropdown {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: calc(100% + 6px);
  z-index: 60;
  padding: 0.35rem 0;
  border-radius: 12px;
  background: var(--dropdown);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  gap: 0.75rem;
}

.user-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .user-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.user-dropdown-item--danger {
  color: #f87171;
}

.user-dropdown-item--sub .theme-current {
  font-size: 0.75rem;
  color: var(--muted);
}

.user-dropdown-sep {
  height: 1px;
  margin: 0.35rem 0.75rem;
  background: var(--border);
}

.theme-submenu {
  padding: 0.25rem 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.theme-option {
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
}

.theme-option:hover {
  border-color: #555;
}

.theme-option.active {
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.35);
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-credits {
  font-size: 0.75rem;
  color: var(--muted);
}

.sidebar-storage {
  margin-top: 0.35rem;
  width: 100%;
  max-width: 100%;
}

.sidebar-storage-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.3;
}

.sidebar-storage-label {
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-storage-text {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-storage-track {
  margin-top: 0.28rem;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

html[data-theme="light"] .sidebar-storage-track {
  background: rgba(0, 0, 0, 0.08);
}

.sidebar-storage-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 75, 139, 0.85), rgba(255, 159, 90, 0.85));
  transition: width 0.25s ease;
}

.sidebar-storage-fill.sidebar-storage-fill--warn {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.sidebar-storage-fill.sidebar-storage-fill--full {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

.mobile-drawer-storage {
  margin-top: 0.45rem;
  max-width: 16rem;
}

.btn-upgrade {
  margin: 0 0.5rem 1rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
}

.btn-upgrade:hover {
  filter: brightness(1.06);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.sidebar-bg-job {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  width: 100%;
  margin: 0.35rem 0 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 138, 106, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 75, 139, 0.14) 0%,
    rgba(255, 159, 90, 0.09) 100%
  );
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  box-sizing: border-box;
  flex-shrink: 0;
  transition: filter 0.15s ease, border-color 0.15s ease;
}

.sidebar-bg-job:hover {
  filter: brightness(1.06);
  border-color: rgba(255, 138, 106, 0.48);
}

.sidebar-bg-job.hidden {
  display: none !important;
}

.sidebar-bg-job__pulse {
  width: 7px;
  height: 7px;
  margin-top: 0.2rem;
  border-radius: 50%;
  background: #ff8a6a;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(255, 138, 106, 0.5);
  animation: sidebar-bg-job-pulse 1.6s ease-out infinite;
}

@keyframes sidebar-bg-job-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 138, 106, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 138, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 138, 106, 0);
  }
}

.sidebar-bg-job__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.sidebar-bg-job__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.sidebar-bg-job__sub {
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-bg-job--drawer {
  margin: 0.35rem 0.65rem 0.5rem;
  width: auto;
}

html[data-theme="light"] .sidebar-bg-job {
  border-color: rgba(234, 88, 12, 0.25);
  background: linear-gradient(
    135deg,
    rgba(255, 237, 213, 0.9) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

html[data-theme="light"] .nav-item.active {
  background: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .nav-item.active .nav-icon {
  background: rgba(0, 0, 0, 0.08);
}

.nav-item.subtle {
  font-size: 0.85rem;
}

/* Longer labels: same typography as other nav items; ellipsis if sidebar is narrow */
.nav-item--long-label .nav-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item-text {
  font: inherit;
  line-height: 1.25;
  color: inherit;
}

.nav-item-label {
  font: inherit;
  line-height: 1.25;
  color: inherit;
}

.nav-icon {
  opacity: 0.9;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg {
  display: block;
}

.nav-item--badge {
  position: relative;
}

.nav-badge {
  margin-left: auto;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}

.btn-create-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-create-mini:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .btn-create-mini:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-footer {
  position: relative;
  padding-top: 0.75rem;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
}

.sidebar-footer .btn-create-mini {
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.sidebar-more-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

/* More trigger: match .btn-create-mini (sidebar + drawer) */
.sidebar-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-more-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .sidebar-more-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-more-btn .nav-icon {
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-more-btn .nav-icon svg {
  display: block;
}

.sidebar-more-menu {
  position: absolute;
  z-index: 70;
  max-height: min(70vh, 420px);
  overflow-y: auto;
  padding: 0.35rem 0;
  border-radius: 12px;
  background: var(--dropdown);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

/* Full sidebar footer width (panel was tied to the narrow “More” column) */
.sidebar-footer > .sidebar-more-menu {
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  top: auto;
}

.mobile-drawer-more {
  position: relative;
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--border);
}

.mobile-drawer-more .sidebar-more-menu {
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: 0;
}

.sidebar-more-item {
  display: block;
  width: 100%;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.sidebar-more-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .sidebar-more-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

a.sidebar-more-item--link {
  text-decoration: none;
  box-sizing: border-box;
}

a.sidebar-more-item--link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-more-sep {
  height: 1px;
  margin: 0.35rem 0.75rem;
  background: var(--border);
}

.sidebar-more-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem 0.45rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

.sidebar-more-social-link {
  display: flex;
  color: var(--muted);
  opacity: 0.85;
  transition: color 0.15s, opacity 0.15s;
}

.sidebar-more-social-link:hover {
  color: var(--text);
  opacity: 1;
}

/* ——— Explore / settings / modal ——— */
.explore-rows {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.explore-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.explore-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.explore-card {
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  min-height: 100px;
}

.explore-card.wide {
  grid-column: 1 / -1;
}

.explore-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff4b8b, #ff9f5a);
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

.explore-card-icon.accent {
  background: var(--gradient);
}

.explore-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ——— Explore: music-library layout ——— */
.explore-page .page-title {
  margin-bottom: 0.35rem;
}

.explore-hero-lead {
  max-width: 42rem;
  margin-bottom: 0.75rem;
}

.explore-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.explore-stat strong {
  color: var(--text);
  font-weight: 700;
}

.explore-stat-sep {
  opacity: 0.45;
}

.explore-hero-link {
  font: inherit;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  color: #ff9f5a;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.explore-hero-link:hover {
  color: #ffd4cc;
}

.explore-section {
  margin-bottom: 0.5rem;
}

.explore-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}

.explore-section-sub {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 48rem;
  line-height: 1.45;
}

.explore-see-all {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.explore-see-all:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] .explore-see-all {
  background: rgba(0, 0, 0, 0.03);
}

.explore-jump-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.explore-jump-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.explore-jump-card:hover {
  border-color: rgba(255, 75, 139, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.explore-jump-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  margin-bottom: 0.35rem;
}

.explore-jump-thumb--library {
  background: linear-gradient(135deg, #ff4b8b 0%, #ff8a6a 45%, #ff9f5a 100%);
}

.explore-jump-thumb--create {
  background: linear-gradient(135deg, #ff4b8b 0%, #ff8a6a 52%, #ff9f5a 100%);
}

.explore-jump-thumb--search {
  background: linear-gradient(135deg, #ff8a6a 0%, #ff4b8b 48%, #ffd4cc 100%);
}

.explore-jump-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.explore-jump-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.explore-jump-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

.explore-recent-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.explore-recent-card {
  flex: 0 0 auto;
  width: 132px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.explore-recent-art {
  width: 132px;
  height: 132px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: center;
}

.explore-recent-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.explore-recent-title {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.explore-recent-card:hover .explore-recent-title {
  color: #ff9f5a;
}

.explore-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.explore-tile {
  position: relative;
  min-height: 108px;
  padding: 1rem 1rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: #fff;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.explore-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.explore-tile-label,
.explore-tile-hint {
  position: relative;
  z-index: 1;
  display: block;
}

.explore-tile-label {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.explore-tile-hint {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.92;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.explore-tile:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.explore-tile--vocals {
  background: linear-gradient(145deg, #ff8a6a 0%, #ff4b8b 50%, #ff9f5a 100%);
}

.explore-tile--drums {
  background: linear-gradient(145deg, #ff4b8b 0%, #ff8a6a 45%, #ff8a6a 100%);
}

.explore-tile--bass {
  background: linear-gradient(145deg, #22c55e 0%, #15803d 50%, #14532d 100%);
}

.explore-tile--synth {
  background: linear-gradient(145deg, #22d3ee 0%, #0891b2 50%, #155e75 100%);
}

.explore-tile--other {
  background: linear-gradient(145deg, #c084fc 0%, #9333ea 50%, #581c87 100%);
}

.explore-tile--full {
  background: linear-gradient(145deg, #ff4b8b 0%, #ff8a6a 45%, #ff9f5a 100%);
}

.explore-cards--tips {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.explore-card--tip {
  min-height: 0;
}

.explore-tip-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.explore-card--tip p {
  margin: 0;
}

.stub-panel {
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  line-height: 1.5;
}

.stub-note {
  margin: 0;
  font-size: 0.9rem;
}

.settings-card {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--elevated);
  overflow: hidden;
  max-width: 520px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.settings-value {
  font-size: 0.9rem;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

.settings-value--mono {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 400;
}

.search-bar-wrap {
  position: relative;
  max-width: 420px;
  margin-bottom: 1.25rem;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.search-input::placeholder {
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.modal-overlay--more-page {
  z-index: 205;
  align-items: flex-start;
  padding-top: max(1.25rem, 4vh);
  padding-bottom: max(1.25rem, 4vh);
}

.modal-card--more-page {
  max-width: min(540px, 100%);
  max-height: min(82vh, 720px);
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.more-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.35rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.more-page-head .modal-title {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
  padding-right: 0.5rem;
}

.more-page-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.2rem -0.15rem 0 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.more-page-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.more-page-scroll {
  padding: 1rem 1.35rem 1.4rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.more-page-prose {
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--muted);
}

.more-page-prose strong {
  color: var(--text);
  font-weight: 600;
}

.more-page-prose a {
  color: #ff9f5a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.more-page-prose a:hover {
  filter: brightness(1.08);
}

.more-page-h3 {
  margin: 1.15rem 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
}

.more-page-h3:first-of-type {
  margin-top: 0.5rem;
}

.more-page-lead {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.5;
}

.more-page-prose ul {
  margin: 0.35rem 0 0.85rem;
  padding-left: 1.2rem;
}

.more-page-prose li {
  margin: 0.35rem 0;
}

.more-page-prose p {
  margin: 0.55rem 0;
}

.more-page-updated {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  opacity: 0.9;
}

.more-page-muted {
  font-size: 0.82rem;
  opacity: 0.92;
  margin-top: 1rem !important;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.modal-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-body {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-modal-primary {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
}

.btn-modal-secondary {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: transparent;
}

.btn-modal-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

.main-column {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .main-column {
    transition: none;
  }
}

/* Studio: shift main column when fixed remix strip is visible (strip is sibling of this column) */
body:has(#viewStudio:not(.hidden)) .main-column {
  margin-left: calc(var(--sidebar-w) + var(--studio-settings-sidebar-w));
}

.main-content {
  width: 100%;
  max-width: min(var(--content-max), 100%);
  margin: 0 auto;
  padding: 1.25rem var(--content-pad-x) 2.5rem;
  position: relative;
  box-sizing: border-box;
}

.layer-split-bg-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem 0;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 138, 106, 0.35);
  background: linear-gradient(
    135deg,
    rgba(255, 75, 139, 0.14) 0%,
    rgba(255, 159, 90, 0.1) 50%,
    rgba(99, 102, 241, 0.08) 100%
  );
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2) inset;
}

.layer-split-bg-banner.hidden {
  display: none !important;
}

.layer-split-bg-banner__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8a6a;
  box-shadow: 0 0 0 0 rgba(255, 138, 106, 0.55);
  animation: layer-split-banner-pulse 1.6s ease-out infinite;
  flex-shrink: 0;
}

@keyframes layer-split-banner-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 138, 106, 0.55);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(255, 138, 106, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 138, 106, 0);
  }
}

.layer-split-bg-banner__main {
  flex: 1;
  min-width: min(100%, 12rem);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.layer-split-bg-banner__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.layer-split-bg-banner__detail {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.layer-split-bg-banner__btn {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.layer-split-bg-banner__btn:hover {
  background: rgba(255, 75, 139, 0.18);
  border-color: rgba(255, 138, 106, 0.45);
}

html[data-theme="light"] .layer-split-bg-banner {
  border-color: rgba(234, 88, 12, 0.28);
  background: linear-gradient(
    135deg,
    rgba(255, 237, 213, 0.95) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  box-shadow: none;
}

html[data-theme="light"] .layer-split-bg-banner__btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.1);
}

.view.hidden {
  display: none;
}

.hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 560px);
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(255, 75, 139, 0.15), transparent 70%);
  pointer-events: none;
}

.home-upload-marketing {
  position: relative;
}

.home-marketing-create .hero-title {
  position: relative;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  text-align: center;
  background: linear-gradient(90deg, #ffc8a8 0%, #ff8a6a 34%, #ff6b8a 62%, #ff4b8b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

}

.home-marketing-create .hero-sub {
  position: relative;
  text-align: center;
  color: var(--muted);
  margin: 0 0 2rem;
  font-size: 1rem;
}

.home-marketing-create .prompt-shell {
  margin-bottom: 1rem;
}

.home-marketing-create .hero-cards {
  margin-top: 2rem;
}

.home-teaser {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0 1rem;
  justify-content: flex-start;
}

.home-teaser-glow {
  top: -28px;
  height: 160px;
  width: min(95%, 640px);
  background: radial-gradient(ellipse at center, rgba(255, 75, 139, 0.22), rgba(255, 75, 139, 0.08), transparent 72%);
}

.home-teaser-title {
  position: relative;
  font-size: clamp(2.15rem, 5.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
  line-height: 1.1;
  max-width: 18ch;
  background: linear-gradient(90deg, #ffc8a8 0%, #ff8a6a 34%, #ff6b8a 62%, #ff4b8b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

}

.home-teaser-sub {
  position: relative;
  margin: 0 0 1.15rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.5;
  color: var(--muted);
  max-width: 36rem;
}

.home-teaser-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

.btn-home-teaser-primary {
  padding: 0.75rem 1.75rem;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
  box-shadow: 0 10px 36px rgba(255, 75, 139, 0.35);
  transition: filter 0.15s, transform 0.15s;
}

.btn-home-teaser-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-home-teaser-secondary {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.btn-home-teaser-secondary:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

.home-teaser-micro {
  position: relative;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.9;
}

.home-where-next {
  position: relative;
  padding-top: 1.15rem;
  margin-top: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.home-where-next::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 520px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 75, 139, 0.35), transparent);
  opacity: 0.9;
}

.home-where-next-label {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.home-path-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: min(1100px, 100%);
  margin: 0 auto;
}

@media (max-width: 640px) {
  .home-path-grid {
    grid-template-columns: 1fr;
  }
}

.home-path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.home-path-card:hover {
  border-color: rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.06);
  transform: translateY(-2px);
}

.home-path-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.home-path-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.home-path-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.home-hero-cards {
  margin-top: 1.35rem;
}

.prompt-shell {
  position: relative;
  margin-bottom: 1rem;
}

.prompt-inner {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.prompt-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  font-size: 1.5rem;
  color: var(--muted);
  border-right: 1px solid var(--border);
}

.prompt-body {
  flex: 1;
  min-width: 0;
}

.dropzone {
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
}

.dropzone:hover,
.dropzone.focus {
  background: rgba(255, 75, 139, 0.06);
}

.dropzone.is-locked {
  cursor: not-allowed;
  opacity: 0.55;
}

.dropzone input {
  display: none;
}

.prompt-placeholder {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.prompt-hint {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.prompt-file-name {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f5f7ff;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.6rem;
  width: min(100%, 27rem);
}

.create-progress-wrap.hidden {
  display: none !important;
}

.create-progress-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.create-progress-fill {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4b8b 0%, #ff7e6a 45%, #ffbf69 100%);
  transition: width 0.22s linear;
}

.create-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 35%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-120%);
  animation: create-progress-sheen 1.3s linear infinite;
}

.create-progress-label {
  min-width: 2.85rem;
  text-align: right;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffd7c8;
  font-variant-numeric: tabular-nums;
}

.create-progress-eta {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.create-progress-eta.hidden {
  display: none !important;
}

@keyframes create-progress-sheen {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(120%);
  }
}

.btn-prompt-action {
  align-self: stretch;
  padding: 0 1.35rem;
  border: none;
  font: inherit;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
  white-space: nowrap;
}

.btn-prompt-action:hover {
  filter: brightness(1.06);
}

.btn-prompt-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.status-line {
  min-height: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.status-line.error {
  color: #ff8a8a;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hero-card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--elevated);
  border: 1px solid var(--border);
}

.hero-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--elevated);
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.hero-card-tag.accent {
  background: rgba(255, 75, 139, 0.25);
  color: #ffd4cc;
}

.hero-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.hero-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.home-project-details {
  position: relative;
  margin-bottom: 1.5rem;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 75, 139, 0.35),
    rgba(255, 75, 139, 0.25),
    rgba(255, 75, 139, 0.12)
  );
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.home-project-details::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  background: linear-gradient(
    165deg,
    rgba(22, 22, 26, 0.97),
    rgba(14, 14, 18, 0.98)
  );
  backdrop-filter: blur(12px);
  z-index: 0;
}

.home-project-details-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.35rem 1.35rem 1.5rem;
  align-items: start;
}

@media (max-width: 560px) {
  .home-project-details-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-project-details-main {
    width: 100%;
    text-align: left;
  }

  .home-project-cover {
    margin: 0 auto;
  }

  .project-details-project-row {
    justify-content: center;
    flex-wrap: wrap;
  }
}

.home-project-cover {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.home-project-cover img,
.home-project-cover .home-project-cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-project-cover .home-project-cover-fallback {
  min-height: 112px;
}

.home-project-details-main {
  min-width: 0;
}

.project-details-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-details-track-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text);
}

.project-details-project-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.35rem;
}

.project-details-project-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-details-project-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.project-details-project-value.is-empty {
  font-weight: 500;
  color: var(--muted);
}

.project-details-project-value .project-tag-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  background: rgba(255, 75, 139, 0.15);
  border: 1px solid rgba(255, 75, 139, 0.35);
  color: #ffd4cc;
  font-size: 0.85rem;
  font-weight: 600;
}

.project-details-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
  max-width: 42ch;
}

.project-details-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
  margin: 0 0 1rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
}

.project-details-dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.project-details-dl dd {
  margin: 0;
  word-break: break-word;
}

.project-details-upload-btn {
  margin-top: 0.15rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.stem-workspace {
  margin-top: 2rem;
}

.waveform-box {
  width: 100%;
  min-width: 0;
  min-height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid var(--border);
  position: relative;
  transition: opacity 0.15s ease;
}

.waveform-box.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.waveform-box.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 75, 139, 0.12) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: waveform-shimmer 1.1s ease-in-out infinite;
  border-radius: inherit;
  pointer-events: none;
}

@keyframes waveform-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* Layer tabs + Key/BPM (right); chord is in .stem-chord-rail above */
.stem-chips-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.5rem;
}

.stem-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0;
}

.stem-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.stem-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: #444;
}

/* Full-tab extract: stacked stem shortcuts */
.stem-extract-wrap {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.stem-extract-wrap.hidden {
  display: none !important;
}

/* Drums tab — kick/snare/hat/clap/percussion lanes */
.stem-drum-layers {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stem-drum-layers.hidden {
  display: none !important;
}

.stem-drum-layers-heading {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.stem-drum-layers-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.stem-vocal-mode-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.stem-vocal-mode-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.stem-vocal-mode-select {
  font: inherit;
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  max-width: 100%;
  min-width: min(100%, 22rem);
}

.stem-vocal-mode-summary {
  margin-top: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.stem-vocal-mode-help {
  margin: 0 0 0.65rem 0;
  max-width: 40rem;
}

.stem-vocal-mode-help-summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  list-style: none;
}

.stem-vocal-mode-help summary::-webkit-details-marker {
  display: none;
}

.stem-vocal-mode-help-list {
  margin: 0.4rem 0 0 1rem;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.stem-vocal-mode-help-list li {
  margin-bottom: 0.35rem;
}

.stem-drum-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  max-width: 22rem;
  margin-bottom: 0.65rem;
}

.stem-drum-progress-wrap.hidden {
  display: none !important;
}

.stem-drum-progress-track {
  flex: 1;
  min-width: 0;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.stem-drum-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 75, 139, 0.88), rgba(255, 159, 90, 0.95));
  transition: width 0.35s ease;
}

/* Layer-split bars: match Create page (taller track + sheen from .create-progress-fill) */
.stem-drum-progress-wrap .stem-drum-progress-track.create-progress-track {
  height: 10px;
}

.stem-drum-progress-fill.create-progress-fill {
  background: linear-gradient(90deg, #ff4b8b 0%, #ff7e6a 45%, #ffbf69 100%);
  transition: width 0.22s linear;
}

.stem-split-eta {
  margin: 0.35rem 0 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.4;
}

.stem-split-eta.hidden {
  display: none !important;
}

.stem-drum-progress-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 2.75rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stem-extract-tb-btn--secondary {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.18);
}

.stem-extract-tb-btn--secondary:hover {
  filter: brightness(1.12);
  border-color: rgba(255, 159, 90, 0.45);
}

.stem-drum-mixer-wrap {
  margin-top: 0.75rem;
}

.stem-drum-mixer-wrap.hidden {
  display: none !important;
}

.stem-drum-mixer-hint {
  margin-bottom: 0.5rem;
}

.stem-extract-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.stem-extract-toggle:hover {
  border-color: #ff8a6a;
  background: rgba(255, 75, 139, 0.12);
}

.stem-extract-toggle[aria-expanded="true"] .stem-extract-chevron {
  transform: rotate(-180deg);
}

.stem-extract-chevron {
  display: inline-block;
  font-size: 0.65rem;
  opacity: 0.85;
  transition: transform 0.2s ease;
}

.stem-extract-panel {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--elevated);
}

.stem-extract-panel.is-open {
  display: block;
}

.stem-extract-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.stem-extract-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.stem-extract-tb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 75, 139, 0.2), rgba(255, 75, 139, 0.15));
  color: var(--text);
  cursor: pointer;
}

.stem-extract-tb-btn:hover {
  filter: brightness(1.08);
}

.stem-extract-tb-btn:not(.stem-extract-tb-dl).is-active {
  border-color: #ff9f5a;
  color: #dbeafe;
  background: rgba(255, 75, 139, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.4);
}

.stem-extract-tb-btn:not(.stem-extract-tb-dl).is-active:hover {
  filter: brightness(1.06);
}

.stem-tb-ico {
  font-size: 0.75rem;
  opacity: 0.9;
}

.stem-layers-status {
  font-size: 0.72rem;
  color: var(--muted);
  flex: 1;
  min-width: 120px;
}

.stem-extract-rows {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stem-extract-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  transition: opacity 0.2s ease, filter 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stem-extract-row-main {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stem-trim-bar {
  margin-top: 0.15rem;
  padding: 0.4rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.stem-trim-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.stem-trim-btn {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.28rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(30, 30, 40, 0.95);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stem-trim-btn:hover:not(:disabled) {
  border-color: rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.12);
}

.stem-trim-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.stem-trim-save {
  border-color: rgba(255, 75, 139, 0.5);
  background: rgba(255, 75, 139, 0.18);
  color: #fef3c7;
}

.stem-trim-save:hover:not(:disabled) {
  background: rgba(255, 75, 139, 0.32);
}

.stem-trim-readout {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  min-width: 9rem;
}

.stem-trim-kind {
  font: inherit;
  font-size: 0.68rem;
  padding: 0.22rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 20, 0.9);
  color: #e2e8f0;
}

.stem-trim-label {
  font: inherit;
  font-size: 0.68rem;
  min-width: 6rem;
  flex: 1 1 120px;
  max-width: 14rem;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 14, 0.9);
  color: var(--text);
}

.stem-trim-category-select {
  font: inherit;
  font-size: 0.68rem;
  min-width: 6.5rem;
  flex: 1 1 120px;
  max-width: 14rem;
  padding: 0.22rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(167, 139, 250, 0.28);
  background: rgba(10, 10, 14, 0.9);
  color: #e9d5ff;
}

.stem-samples-panel {
  margin-top: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.stem-samples-panel-title {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.stem-samples-hint {
  margin: 0 0 0.5rem !important;
  font-size: 0.72rem !important;
}

.stem-samples-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stem-samples-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stem-samples-name {
  font-weight: 600;
  color: var(--text);
  flex: 1 1 140px;
  min-width: 0;
}

.stem-samples-meta {
  font-size: 0.68rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stem-samples-dl {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.14);
  color: #c7d2fe;
}

.stem-samples-dl:hover {
  background: rgba(255, 75, 139, 0.28);
  color: #eef2ff;
}

.stem-samples-del {
  font: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: transparent;
  color: #fca5a5;
  cursor: pointer;
}

.stem-samples-del:hover {
  background: rgba(248, 113, 113, 0.12);
}

.stem-samples-empty {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ——— Samples page (trimmed clips library) ——— */
.samples-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  max-width: 960px;
}

.samples-cat-tabs {
  flex-wrap: wrap;
}

.samples-kind-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.samples-search-wrap {
  max-width: 28rem;
}

.samples-grid {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  max-width: min(960px, 100%);
}

.samples-card {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

/* Top row: horizontal transport + waveform + category / WAV / Del */
.samples-card-row-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  min-width: 0;
}

.samples-card-player {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 200px;
  min-width: 0;
}

.samples-card-transport {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  flex-shrink: 0;
}

.samples-card-transport .stem-sample-t-btn {
  width: 1.45rem;
  height: 1.45rem;
}

.samples-card-transport .stem-sample-t-ico {
  width: 12px;
  height: 12px;
}

.samples-card-wave-host {
  flex: 1 1 100px;
  min-width: 72px;
  min-height: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 12, 0.55);
  overflow: hidden;
}

.samples-card-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem 0.35rem;
  flex: 0 1 auto;
  min-width: 0;
}

.samples-card-toolbar .samples-cat-select {
  min-width: 5.5rem;
  max-width: 11rem;
  flex: 1 1 7rem;
}

.samples-card-dl.stem-samples-dl,
.samples-card-del.stem-samples-del {
  padding: 0.18rem 0.38rem;
  font-size: 0.62rem;
  white-space: nowrap;
}

.samples-card-meta-line {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  line-height: 1.25;
}

.samples-card-title {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--text);
}

.samples-card-chips {
  font-weight: 400;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.samples-card-track {
  margin: 0;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.samples-cat-select {
  font: inherit;
  font-size: 0.68rem;
  padding: 0.2rem 0.32rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 14, 0.9);
  color: var(--text);
}

@media (max-width: 520px) {
  .samples-card-toolbar {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .samples-card-toolbar .samples-cat-select {
    max-width: none;
    flex: 1 1 140px;
  }
}

.stem-extract-dl {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.38rem;
  min-width: 3.4rem;
  padding-top: 0.1rem;
}

.stem-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.32rem 0.42rem;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.14);
  color: #c7d2fe;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.stem-dl-btn:hover:not(.is-disabled) {
  background: rgba(255, 75, 139, 0.28);
  border-color: #ff9f5a;
  color: #eef2ff;
}

.stem-dl-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* MIDI downloads — distinct from MP3/WAV (pink) */
.stem-dl-midi {
  border-style: solid;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(6, 182, 212, 0.14);
  color: #a5f3fc;
}

.stem-dl-midi:hover:not(.is-disabled) {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.22);
  color: #ecfeff;
}

[data-theme="light"] .stem-dl-midi {
  border-color: rgba(8, 145, 178, 0.45);
  background: rgba(207, 250, 254, 0.65);
  color: #0e7490;
}

[data-theme="light"] .stem-dl-midi:hover:not(.is-disabled) {
  border-color: #0891b2;
  background: rgba(165, 243, 252, 0.95);
  color: #155e75;
}

.stem-extract-tb-dl {
  text-decoration: none;
}

.stem-extract-tb-dl.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}

.stem-extract-row.is-unavailable {
  opacity: 0.45;
  pointer-events: none;
}

.stem-extract-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stem-extract-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stem-solo-btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.stem-solo-btn:hover:not(:disabled) {
  border-color: #ff4b8b;
  color: #ff9f5a;
}

.stem-solo-btn.is-active {
  border-color: #ff9f5a;
  color: #dbeafe;
  background: rgba(255, 75, 139, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.45);
}

.stem-extract-row.is-solo-dim:not(.is-unavailable) {
  opacity: 0.42;
  filter: grayscale(0.35) brightness(0.85);
}

.stem-extract-row.is-solo-armed:not(.is-unavailable) {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 75, 139, 0.22);
  background: rgba(255, 75, 139, 0.08);
}

/* Stem mute: hidden checkbox + iOS-style switch (still a real checkbox for a11y) */
.stem-mute-toggle {
  position: relative;
  font-size: 0.72rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
}

.stem-mute-toggle .stem-mute-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.stem-mute-switch {
  position: relative;
  display: inline-block;
  width: 2.35rem;
  height: 1.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stem-mute-switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.stem-mute-cb:checked + .stem-mute-switch {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(248, 113, 113, 0.55);
}

.stem-mute-cb:checked + .stem-mute-switch::after {
  transform: translateX(1.05rem);
}

.stem-mute-cb:focus-visible + .stem-mute-switch {
  box-shadow: 0 0 0 2px var(--elevated), 0 0 0 4px rgba(255, 75, 139, 0.55);
}

.stem-mute-text {
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: color 0.15s ease;
}

.stem-extract-row.is-muted .stem-mute-text {
  color: #f87171;
}

html[data-theme="light"] .stem-mute-switch {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
}

.stem-extract-wave-wrap {
  position: relative;
  min-height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stem-mute-glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  color: #f87171;
  text-shadow: 0 0 14px rgba(0, 0, 0, 0.95);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  background: rgba(0, 0, 0, 0.22);
  z-index: 2;
}

.stem-extract-row.is-muted .stem-mute-glyph {
  opacity: 1;
}

.stem-extract-wave {
  min-height: 48px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: none;
}

.stem-extract-wave.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--muted);
}

.stem-extract-name {
  font-weight: 600;
  font-size: 0.85rem;
}

/* Library / Search: stem category = stacked samples (like extract layers) */
.stem-sample-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.stem-sample-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.75rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stem-sample-transport {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.stem-sample-transport.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.stem-sample-t-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.stem-sample-t-btn:hover:not(:disabled) {
  border-color: rgba(255, 75, 139, 0.55);
  background: rgba(255, 75, 139, 0.22);
  color: #eef2ff;
}

.stem-sample-t-btn:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.stem-sample-t-btn.stem-sample-t-pause.is-active {
  border-color: rgba(167, 139, 250, 0.55);
  color: #dbeafe;
  background: rgba(255, 75, 139, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 75, 139, 0.25);
}

.stem-sample-t-ico {
  display: block;
  flex-shrink: 0;
}

.stem-sample-row-main {
  flex: 1 1 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.stem-sample-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stem-sample-title-block {
  font-size: 0.85rem;
  line-height: 1.35;
  min-width: 0;
}

.stem-sample-track-name {
  font-weight: 600;
  color: var(--text);
}

.stem-sample-stem-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: #a5b4fc;
  letter-spacing: 0.02em;
}

.stem-sample-open-btn {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 75, 139, 0.45);
  background: rgba(255, 75, 139, 0.14);
  color: #c7d2fe;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.stem-sample-open-btn:hover {
  background: rgba(255, 75, 139, 0.28);
  border-color: #ff9f5a;
  color: #eef2ff;
}

.stem-sample-wave-wrap {
  position: relative;
  min-height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stem-sample-wave-wrap.is-loading {
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(30, 30, 35, 0.95) 0%,
    rgba(55, 55, 65, 0.9) 45%,
    rgba(30, 30, 35, 0.95) 90%
  );
  background-size: 200% 100%;
  animation: stem-sample-wave-skel 1.1s ease-in-out infinite;
}

.stem-sample-wave-wrap.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 75, 139, 0.12),
    transparent
  );
  animation: stem-sample-wave-shine 1.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes stem-sample-wave-skel {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@keyframes stem-sample-wave-shine {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}

.stem-sample-wave-wrap.stem-sample-wave-error {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #f87171;
}

.stem-sample-wave {
  min-height: 52px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border: none;
}

.stem-sample-empty {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

html[data-theme="light"] .stem-sample-row {
  background: rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] .stem-sample-t-btn {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.12);
  color: #334155;
}

html[data-theme="light"] .stem-sample-t-btn:hover:not(:disabled) {
  background: rgba(255, 75, 139, 0.12);
  border-color: rgba(255, 75, 139, 0.45);
  color: #ff8a6a;
}

html[data-theme="light"] .stem-sample-wave-wrap {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .stem-sample-wave-wrap.is-loading {
  background: linear-gradient(
    105deg,
    #e2e8f0 0%,
    #f8fafc 45%,
    #e2e8f0 90%
  );
  background-size: 200% 100%;
}

.stem-btn.active {
  border: none;
  padding: calc(0.45rem + 1px) calc(0.85rem + 1px);
  color: #fff;
  background: var(--gradient-h);
  background-clip: padding-box;
}

.stem-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.page-desc {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* ——— Account & billing ——— */
.account-view .page-desc {
  max-width: 42rem;
}

.account-page {
  max-width: 960px;
}

.account-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 75, 139, 0.12) 0%, rgba(15, 15, 18, 0.92) 42%, rgba(232, 72, 120, 0.08) 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .account-summary {
  background: linear-gradient(135deg, rgba(255, 75, 139, 0.08) 0%, rgba(255, 255, 255, 0.95) 45%, rgba(255, 159, 90, 0.14) 100%);
}

.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  flex: 1;
  min-width: min(100%, 420px);
}

@media (max-width: 640px) {
  .account-summary-grid {
    grid-template-columns: 1fr;
  }
}

.account-summary-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.account-summary-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.account-summary-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.account-summary-value--hero {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.account-summary-value--muted {
  font-weight: 500;
  color: var(--muted);
}

.account-summary-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-account-primary {
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: none;
  background: var(--gradient);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(255, 75, 139, 0.35);
}

.btn-account-primary:hover {
  filter: brightness(1.06);
}

.account-block {
  margin-bottom: 2rem;
}

.account-block-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.account-block-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 40rem;
  line-height: 1.5;
}

.account-premier-packages {
  margin-top: 0.5rem;
}

.account-settings-card {
  max-width: 640px;
}

.account-footnote {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.account-security-stub .stub-note {
  margin: 0;
}

.account-inline-link {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-inline-link:hover {
  color: var(--accent, #ff9f5a);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— Profile (Suno-style, refined) ——— */
.profile-suno-wrap .page-title,
.profile-suno-wrap .page-desc {
  display: none;
}

.profile-suno {
  margin: -0.5rem calc(-1 * var(--content-pad-x)) 0;
  padding-bottom: 2.5rem;
}

.profile-header {
  margin-bottom: 0.25rem;
}

.profile-banner-wrap {
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.profile-banner {
  position: relative;
  min-height: 240px;
  max-height: min(36vh, 340px);
  background: #0b0b0b;
}

.profile-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

.profile-banner-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #121212 0%, #1c1c1c 28%, #ff4b8b 52%, #ff8a6a 78%, #ff9f5a 100%);
}

.profile-banner-scrim {
  position: absolute;
  inset: 0;
  /* Alsó élen nincs lekerekítés: a sötétedés itt olvad a lap háttérszínébe. */
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.35) 42%,
    rgba(0, 0, 0, 0.65) 72%,
    var(--bg) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.profile-banner-noise {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

.profile-banner-toolbar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.profile-toolbar-btn {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 8, 12, 0.5);
  color: #fafafa;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.profile-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.profile-toolbar-btn--edit {
  padding-left: 0.85rem;
}

.profile-toolbar-btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.profile-toolbar-ico {
  flex-shrink: 0;
  opacity: 0.95;
}

html[data-theme="light"] .profile-toolbar-btn {
  background: rgba(255, 255, 255, 0.85);
  color: #121212;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.profile-identity-shell {
  padding: 0 var(--content-pad-x);
  margin-top: -64px;
  position: relative;
  z-index: 3;
}

.profile-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.25rem 1.5rem;
}

.profile-avatar-ring {
  flex-shrink: 0;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 75, 139, 0.95), rgba(255, 130, 120, 0.88), rgba(255, 159, 90, 0.92));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.profile-avatar-wrap {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid var(--bg);
  overflow: hidden;
  background: var(--elevated);
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  font-weight: 800;
  background: var(--gradient);
  color: #fff;
  letter-spacing: -0.02em;
}

.profile-identity-main {
  flex: 1 1 240px;
  min-width: 0;
  padding-bottom: 0.15rem;
}

.profile-name {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

.profile-handle {
  margin: 0.35rem 0 0.75rem;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.profile-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.profile-genre-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
}

html[data-theme="light"] .profile-genre-chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--border);
}

.profile-bio {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #a1a1aa;
  max-width: 56rem;
}

html[data-theme="light"] .profile-bio {
  color: var(--muted);
}

.profile-stats-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.profile-stat-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.profile-stat-pill strong {
  color: var(--text);
  font-weight: 700;
  margin-right: 0.2rem;
}

.profile-stat-pill--dim {
  opacity: 0.95;
}

.profile-block {
  margin-top: 2rem;
  padding: 0 var(--content-pad-x);
}

.profile-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.profile-block-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-tabs-pill {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  gap: 2px;
}

html[data-theme="light"] .profile-tabs-pill {
  background: rgba(0, 0, 0, 0.04);
}

.profile-tab-pill {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.profile-tab-pill.active {
  background: #f5f5f5;
  color: #0a0a0a;
}

html[data-theme="light"] .profile-tab-pill.active {
  background: #121212;
  color: #fafafa;
}

.profile-featured-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--elevated);
}

.profile-featured-card--empty {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
  padding: 2rem 1.25rem;
  color: var(--muted);
}

.profile-featured-card--empty p {
  margin: 0;
  max-width: 28rem;
  line-height: 1.5;
}

.profile-featured-art {
  border-radius: 12px;
  overflow: hidden;
  min-height: 140px;
  background: #222;
}

.profile-featured-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1;
}

.profile-featured-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
}

.profile-featured-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-featured-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-featured-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.btn-profile-open {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: #0a0a0a;
  background: #f5f5f5;
}

.btn-profile-open:hover {
  filter: brightness(1.06);
}

html[data-theme="light"] .btn-profile-open {
  background: #121212;
  color: #fafafa;
}

.profile-track-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-track-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.profile-track-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.profile-track-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #222;
}

.profile-track-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-track-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-track-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.profile-track-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-track-play:hover {
  border-color: rgba(255, 75, 139, 0.45);
  color: #fff;
  background: rgba(255, 75, 139, 0.15);
}

.modal-overlay--profile {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.72);
}

.modal-card--profile {
  padding: 0;
  max-width: 880px;
  width: calc(100% - 1.75rem);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #1c1c1c 0%, #121212 100%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
  max-height: min(92vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

html[data-theme="light"] .modal-card--profile {
  background: #fafafa;
  border-color: var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
}

.profile-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.profile-edit-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile-edit-sub {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 36rem;
}

.profile-edit-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.profile-edit-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.profile-edit-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem 1rem;
  overflow-y: auto;
}

.profile-edit-visual {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-edit-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .profile-edit-card {
  background: #fff;
}

.profile-edit-card-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.profile-edit-banner-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 2.2 / 1;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-edit-banner-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-edit-banner-preview-ph {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff4b8b 0%, #ff8a6a 45%, #ff9f5a 100%);
}

.profile-edit-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.profile-edit-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transition: background 0.15s;
}

.profile-edit-file-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-edit-link-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-edit-link-btn:hover {
  color: #ff9f5a;
}

.profile-edit-card--avatar .profile-edit-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background: #111;
}

.profile-edit-avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-edit-avatar-preview-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  color: #fff;
}

.profile-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.profile-edit-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.35rem;
}

.profile-edit-label:first-child {
  margin-top: 0;
}

.profile-edit-optional {
  font-weight: 500;
  opacity: 0.85;
}

.profile-edit-input,
.profile-edit-textarea {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-edit-input:focus,
.profile-edit-textarea:focus {
  outline: none;
  border-color: rgba(255, 75, 139, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 75, 139, 0.12);
}

.profile-edit-input-wrap {
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.profile-edit-prefix {
  padding: 0.65rem 0 0.65rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.profile-edit-input--handle {
  flex: 1;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
}

.profile-edit-bio-wrap {
  position: relative;
}

.profile-edit-textarea {
  resize: vertical;
  min-height: 6.5rem;
  width: 100%;
  padding-bottom: 1.75rem;
}

.profile-edit-bio-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  pointer-events: none;
}

.profile-edit-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

html[data-theme="light"] .profile-edit-footer {
  background: rgba(0, 0, 0, 0.03);
}

.profile-edit-cancel {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.profile-edit-cancel:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.profile-edit-save {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 24px rgba(255, 75, 139, 0.35);
}

.profile-edit-save:hover {
  filter: brightness(1.06);
}

@media (max-width: 720px) {
  .profile-edit-layout {
    grid-template-columns: 1fr;
  }

  .modal-card--profile {
    max-height: 95vh;
  }
}

@media (max-width: 640px) {
  .profile-featured-card:not(.profile-featured-card--empty) {
    grid-template-columns: 1fr;
  }

  .profile-banner {
    min-height: 180px;
    max-height: 42vh;
  }

  .profile-identity-shell {
    margin-top: -48px;
  }

  .profile-avatar-wrap {
    width: 104px;
    height: 104px;
  }

  .profile-avatar-ring {
    padding: 3px;
  }

  .profile-banner-toolbar {
    top: 0.65rem;
    right: 0.65rem;
  }
}

.library-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.library-tabs-sep {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0.35rem;
}

.library-tab {
  box-sizing: border-box;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.library-tab:hover {
  color: var(--foreground, #fff);
  border-color: rgba(255, 75, 139, 0.45);
}

.library-tab.active {
  color: #fff;
  /* Ne legyen 1px „átlátszó” keret a gradiens felett — ez okozta a téglalap / keret csíkot */
  border: none;
  padding: calc(0.4rem + 1px) calc(0.65rem + 1px);
  background: var(--gradient);
  background-clip: border-box;
}

.library-tab:focus {
  outline: none;
}

.library-tab:focus-visible {
  outline: 2px solid rgba(255, 75, 139, 0.65);
  outline-offset: 2px;
}

.library-tab--stem {
  font-size: 0.75rem;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.library-card {
  position: relative;
  border-radius: 12px;
  background: var(--elevated);
  border: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 140px;
}

.library-card-fav {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 1rem;
  opacity: 0.35;
  pointer-events: none;
}

.library-card-fav.is-on {
  opacity: 1;
}

.library-card-head {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  min-width: 0;
}

.library-card-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.library-card-titleblock {
  flex: 1;
  min-width: 0;
}

.library-card-project {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
  word-break: break-word;
}

.library-card h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.library-card .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
}

.library-card-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.library-card-actions .open,
.library-card-actions .library-btn-edit {
  flex: 0 0 auto;
  margin-left: auto;
  margin-top: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.library-card-actions .open {
  color: #fff;
  background: var(--gradient);
}

.library-card-actions .open--load-studio {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.library-card-actions .open--load-studio:hover {
  border-color: rgba(168, 85, 247, 0.55);
  background: rgba(168, 85, 247, 0.12);
}

.library-card-actions .library-btn-edit {
  color: var(--foreground, #fff);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.library-card-actions .library-btn-edit:hover {
  border-color: rgba(255, 75, 139, 0.5);
  background: rgba(255, 75, 139, 0.12);
}

.library-edit-menu {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 0.35rem 0;
  border-radius: 12px;
  background: var(--elevated, #1a1a1a);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.library-edit-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.library-edit-menu button:hover,
.library-edit-menu button:focus-visible {
  background: rgba(255, 75, 139, 0.15);
  outline: none;
}

.library-edit-menu .menu-sep {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.library-edit-menu .menu-hint {
  padding: 0.35rem 1rem 0.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
}

.library-edit-menu button.menu-danger {
  color: #f87171;
}

.library-edit-menu button.menu-danger:hover {
  background: rgba(248, 113, 113, 0.12);
}

.badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #333;
  color: var(--muted);
}

.badge.done {
  background: rgba(255, 75, 139, 0.2);
  color: #ffd4cc;
}

.badge.run {
  background: rgba(255, 75, 139, 0.18);
  color: #ff9f5a;
}

/* ——— Bottom player ——— */
.bottom-player {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0 var(--content-pad-x) 0 calc(var(--sidebar-w) + var(--content-pad-x));
  height: calc(var(--player-h) - 3px);
  max-width: 100%;
}

.bottom-info {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.85rem;
}

.bottom-title {
  font-weight: 600;
}

.bottom-title .logo-wordmark {
  font-size: 1.08rem;
}

.bottom-sep {
  color: var(--muted);
  margin: 0 0.25rem;
}

.bottom-stem {
  color: var(--muted);
  text-transform: capitalize;
}

.bottom-transport {
  flex-shrink: 0;
}

.bp-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
  box-shadow: 0 4px 20px rgba(255, 75, 139, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.bp-btn .bp-ico {
  display: block;
  flex-shrink: 0;
}

.bp-btn:hover {
  filter: brightness(1.08);
}

.bottom-time {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bottom-progress-track {
  height: 3px;
  background: #222;
  position: relative;
}

.bottom-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  transition: width 0.1s linear;
}

html[data-theme="light"] .bottom-player {
  background: rgba(255, 255, 255, 0.94);
}

/* ——— Mobile header & drawer ——— */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 45;
  height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.65rem 0 0.5rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.mobile-brand-center {
  font-size: 1.02rem;
  max-width: 52vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-header-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-header-credits {
  font-size: 0.72rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.mobile-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.mobile-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .mobile-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-notif-wrap {
  position: relative;
}

.mobile-nav-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  font-size: 0.6rem;
  line-height: 1rem;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mobile-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 92vw);
  z-index: 80;
  background: var(--panel);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  overflow-y: auto;
  padding-bottom: 1.5rem;
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer-brand {
  font-size: 1.12rem;
}

.mobile-drawer-close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-drawer-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.mobile-drawer-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.mobile-drawer-credits {
  font-size: 0.8rem;
  color: var(--muted);
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.65rem;
}

.mobile-drawer-account {
  padding: 0.75rem 1rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.mobile-drawer-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.mobile-drawer-account .user-dropdown-item {
  width: 100%;
  border-radius: 10px;
}

.mobile-theme-inline {
  margin: 0.5rem 0 0.75rem;
}

.mobile-theme-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.mobile-theme-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mobile-theme-btns .theme-option {
  flex: 1;
  min-width: 4rem;
  text-align: center;
  padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
}

/* ——— Notifications modal ——— */
.modal-card--notif {
  max-width: 580px;
  width: 100%;
  max-height: min(88vh, 720px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.notif-tab-group {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  gap: 2px;
}

.notif-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.notif-tab:hover {
  color: var(--text);
}

.notif-tab--active {
  background: var(--elevated);
  color: var(--text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.notif-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.notif-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.notif-icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.notif-icon-btn[aria-expanded="true"] {
  background: rgba(255, 75, 139, 0.12);
  color: var(--accent-pink);
}

.notif-settings-panel {
  margin: 0 1.25rem 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.notif-settings-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.notif-settings-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.45rem;
  cursor: pointer;
}

.notif-settings-row:last-child {
  margin-bottom: 0;
}

.notif-settings-row input {
  accent-color: var(--accent-pink);
  width: 1rem;
  height: 1rem;
}

.notif-panels-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem 1.15rem;
}

.notif-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.btn-text {
  border: none;
  background: none;
  color: var(--accent-pink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.btn-text:hover {
  text-decoration: underline;
  background: rgba(255, 75, 139, 0.08);
}

.notif-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0 0.15rem 0 0;
  overflow-y: auto;
  flex: 1;
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.notif-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  text-align: left;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.notif-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.notif-item--unread {
  border-color: rgba(255, 75, 139, 0.35);
  background: linear-gradient(135deg, rgba(255, 75, 139, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.12), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.notif-item-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-item-icon--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.notif-item-icon--err {
  background: rgba(248, 113, 113, 0.14);
  color: #f87171;
}

.notif-item-icon--drum {
  background: rgba(96, 165, 250, 0.14);
  color: #60a5fa;
}

.notif-item-icon--vocal {
  background: rgba(192, 132, 252, 0.16);
  color: #c084fc;
}

.notif-item-icon--default {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.notif-item-icon svg {
  display: block;
}

.notif-item-main {
  flex: 1;
  min-width: 0;
}

.notif-item-title {
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  line-height: 1.25;
}

.notif-item-body {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.45rem;
}

.notif-item-meta time {
  color: var(--muted);
}

.notif-item-meta-abs {
  opacity: 0.75;
}

.notif-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 2rem 1rem 1.5rem;
}

/* ——— Studio sketch ——— */
.studio-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: min(1200px, 100%);
}

.card-block {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--elevated);
  padding: 1rem 1.15rem;
}

.studio-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.studio-select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.studio-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0.65rem 0 0;
  line-height: 1.45;
}

.studio-mixer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.studio-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 75, 139, 0.2);
  color: #ff9f5a;
}

.studio-badge--soft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

html[data-theme="light"] .studio-badge--soft {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
  border-color: rgba(0, 0, 0, 0.08);
}

.studio-channels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.studio-channel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.studio-ch-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.studio-fader-track {
  height: 6px;
  border-radius: 999px;
  background: var(--elevated);
  overflow: hidden;
}

.studio-fader-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient);
}

.studio-ch-db {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.studio-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .studio-row2 {
    grid-template-columns: 1fr;
  }
}

.studio-master-meter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.studio-master-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.studio-master-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.studio-fx-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.studio-fx-chip {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
}

.studio-fx-chip.off {
  opacity: 0.45;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.btn-studio {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  background: var(--gradient);
}

.btn-studio:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-studio--ghost {
  background: var(--elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.studio-code {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  word-break: break-all;
}

.studio-vocal-cost {
  margin-top: 0.5rem;
}

.studio-vocal-actions {
  margin-top: 0.75rem;
}

.studio-vocal-status {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

.studio-vocal-status.error {
  color: #f87171;
}

.studio-vocal-download {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ff9f5a;
  text-decoration: underline;
}

.studio-vocal-download:hover {
  filter: brightness(1.08);
}

.studio-vocal-dl-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: 0.5rem;
}

.studio-remix-details {
  margin-top: 1rem;
}

.studio-remix-details > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.35rem 0;
}

.studio-remix-details > summary::-webkit-details-marker {
  display: none;
}

.studio-remix-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-remix-summary-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.studio-remix-summary-sub {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1 1 100%;
  padding-left: 0.15rem;
}

@media (min-width: 560px) {
  .studio-remix-summary-sub {
    flex: 1 1 auto;
    padding-left: 0;
  }
}

.studio-remix-details-inner {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.studio-remix-lead {
  margin-top: 0.35rem !important;
}

.studio-remix-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 1rem;
  margin-top: 0.5rem;
}

.studio-remix-compact-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.studio-select--compact,
.studio-text-input--compact {
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
}

.studio-remix-sliders-inline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.5rem;
  align-items: center;
  margin-top: 0.25rem;
}

.studio-remix-inline-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* AI Remix: stacked sliders + custom range (warm fill, neutral thumb — no default blue) */
.studio-remix-sliders-inline.studio-remix-sliders--modern {
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
  margin-top: 0.4rem;
}

.studio-remix-sliders--modern .studio-remix-inline-lbl {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0;
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  white-space: normal;
}

.studio-remix-sliders--modern .studio-remix-val {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 700;
  font-size: 0.78rem;
}

.studio-layer-remix-sliders.studio-remix-sliders--modern {
  grid-column: 1 / -1;
}

.studio-hint--remix-lead {
  font-size: 0.76rem !important;
  line-height: 1.5 !important;
  opacity: 0.96;
}

input[type="range"].studio-remix-range {
  --remix-fill-pct: 0%;
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"].studio-remix-range:focus {
  outline: none;
}

input[type="range"].studio-remix-range:focus-visible {
  outline: 2px solid rgba(255, 138, 106, 0.55);
  outline-offset: 3px;
  border-radius: 6px;
}

input[type="range"].studio-remix-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    #e85d4a 0%,
    #ff8f5c var(--remix-fill-pct),
    rgba(255, 255, 255, 0.09) var(--remix-fill-pct),
    rgba(255, 255, 255, 0.09) 100%
  );
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.28) inset;
}

input[type="range"].studio-remix-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffffff 0%, #e4e4e7 100%);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 0 0 1px rgba(0, 0, 0, 0.14);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

input[type="range"].studio-remix-range:hover::-webkit-slider-thumb {
  transform: scale(1.07);
  box-shadow:
    0 3px 16px rgba(232, 93, 74, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset,
    0 0 0 1px rgba(232, 93, 74, 0.28);
}

input[type="range"].studio-remix-range:active::-webkit-slider-thumb {
  transform: scale(1.03);
}

input[type="range"].studio-remix-range::-moz-range-track {
  height: 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22) inset;
}

input[type="range"].studio-remix-range::-moz-range-progress {
  height: 5px;
  border-radius: 9999px;
  background: linear-gradient(90deg, #e85d4a, #ff8f5c);
}

input[type="range"].studio-remix-range::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(160deg, #ffffff 0%, #e4e4e7 100%);
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.14);
  transition: transform 0.12s ease;
}

input[type="range"].studio-remix-range:hover::-moz-range-thumb {
  transform: scale(1.07);
}

html[data-theme="light"] input[type="range"].studio-remix-range::-webkit-slider-runnable-track {
  background: linear-gradient(
    90deg,
    #ea580c 0%,
    #fb923c var(--remix-fill-pct),
    rgba(0, 0, 0, 0.08) var(--remix-fill-pct),
    rgba(0, 0, 0, 0.08) 100%
  );
  box-shadow: none;
}

html[data-theme="light"] input[type="range"].studio-remix-range::-moz-range-track {
  background: rgba(0, 0, 0, 0.09);
}

html[data-theme="light"] input[type="range"].studio-remix-range::-moz-range-progress {
  background: linear-gradient(90deg, #ea580c, #fb923c);
}

.studio-remix-cb--solo {
  margin: 0.35rem 0 0.5rem;
}

.studio-remix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.studio-remix-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.studio-remix-col .studio-label {
  margin-top: 0.25rem;
}

.studio-remix-cb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text);
  cursor: pointer;
}

.studio-remix-cb input {
  accent-color: #ff4b8b;
}

.studio-text-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.studio-remix-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.studio-remix-cost {
  margin-top: 0.75rem;
}

.studio-remix-actions {
  margin-top: 0.65rem;
}

.studio-remix-dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.65rem;
}

.studio-remix-dl-row a {
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff9f5a;
  text-decoration: underline;
}

.btn-studio--sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-studio--round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

/* ——— Studio page (DAW workspace) ——— */
.studio-page {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(0.65rem, 2.5vw, 1.35rem) 2rem;
  box-sizing: border-box;
}

/*
 * Studio: use the full main column width. Global `.main-content` caps at --content-max (1680px)
 * and centers — on ultrawide monitors the DAW felt like a narrow floating box.
 * Also join project picker + workspace into one continuous panel (less “card in a card”).
 */
.main-content:has(#viewStudio:not(.hidden)) {
  max-width: none;
}

.main-content:has(#viewStudio:not(.hidden)) .studio-page {
  padding-left: 0;
  padding-right: 0;
}

.main-content:has(#viewStudio:not(.hidden)) .studio-shell {
  gap: 0.75rem;
}

.studio-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

/* Collapsed: width 0 — main column margin follows same custom property */
html.studio-settings-panel-collapsed {
  --studio-settings-sidebar-w: 0px;
}

html.studio-settings-panel-collapsed .studio-settings-sidebar {
  border-right-width: 0;
  box-shadow: none;
  pointer-events: none;
}

/* Studio: fixed secondary strip — Suno-adjacent: glass, cards, minimize */
.studio-settings-sidebar {
  display: none;
  position: fixed;
  z-index: 28;
  left: var(--sidebar-w);
  top: 0;
  bottom: var(--player-h);
  width: var(--studio-settings-sidebar-w);
  box-sizing: border-box;
  flex-direction: column;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border-right: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
  transition:
    width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.2s ease,
    box-shadow 0.25s ease;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .studio-settings-sidebar {
    transition: none;
  }
}

html[data-theme="light"] .studio-settings-sidebar {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.06);
}

body:has(#viewStudio:not(.hidden)) .studio-settings-sidebar {
  display: flex;
}

.studio-settings-sidebar-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.studio-settings-sidebar-topbar-text {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.studio-settings-sidebar-kicker {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.studio-settings-sidebar-headline {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}

.studio-settings-panel-collapse {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.studio-settings-panel-collapse:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .studio-settings-panel-collapse {
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="light"] .studio-settings-panel-collapse:hover {
  background: rgba(0, 0, 0, 0.07);
}

.studio-settings-sidebar-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.studio-settings-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: visible;
  padding: 0.75rem 0.75rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.studio-settings-sidebar-tagline {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.studio-settings-block {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.studio-settings-block--card {
  padding: 0.85rem 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

html[data-theme="light"] .studio-settings-block--card {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: none;
}

.studio-settings-block--remix {
  padding-top: 0.75rem;
}

.studio-settings-block-title {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.5rem;
  opacity: 0.95;
}

.studio-settings-sidebar .studio-project-combo-btn {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-settings-sidebar .studio-project-combo-btn:hover {
  border-color: rgba(255, 159, 90, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 159, 90, 0.08);
}

html[data-theme="light"] .studio-settings-sidebar .studio-project-combo-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.1);
}

.studio-hint--sidebar {
  font-size: 0.74rem;
  line-height: 1.45;
  margin-top: 0.45rem !important;
  margin-bottom: 0 !important;
  opacity: 0.92;
}

.studio-remix-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.studio-remix-sidebar-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

/* AI Remix Panel — section tags (Full mix, Vocals, stems…) */
.studio-remix-tab-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  min-width: 0;
}

.studio-remix-tab-nav {
  flex-shrink: 0;
  width: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.studio-remix-tab-nav:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.studio-remix-tab-scroll {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.studio-remix-tab-scroll::-webkit-scrollbar {
  height: 4px;
}

.studio-remix-tab-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.studio-remix-tab {
  flex-shrink: 0;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.studio-remix-tab:hover {
  color: var(--text);
  border-color: rgba(168, 85, 247, 0.35);
}

.studio-remix-tab--active {
  border-color: rgba(168, 85, 247, 0.55);
  color: var(--text);
  background: rgba(168, 85, 247, 0.14);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12);
}

html[data-theme="light"] .studio-remix-tab {
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .studio-remix-tab--active {
  background: rgba(168, 85, 247, 0.12);
}

.studio-remix-tab-panel {
  margin-top: 0.15rem;
}

.studio-remix-tab-panel.hidden {
  display: none !important;
}

.studio-remix-job-strip {
  margin: 0 0 0.55rem;
  min-height: 0;
}

.studio-remix-vocal-lead,
.studio-remix-layer-lead {
  margin-top: 0 !important;
}

.studio-remix-layer-cost {
  margin: 0.5rem 0 0 !important;
  font-size: 0.78rem;
}

.studio-settings-sidebar-footer--remix .studio-remix-footer-block {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.studio-settings-sidebar-footer--remix .studio-remix-footer-block.hidden {
  display: none !important;
}

.studio-remix-footer-muted {
  margin: 0 !important;
  font-size: 0.76rem;
  line-height: 1.45;
  opacity: 0.92;
}

.btn-studio--layer-remix {
  margin-top: 0.15rem;
}

.studio-remix-compact-grid--sidebar {
  grid-template-columns: 1fr;
}

.studio-settings-sidebar .studio-select--compact,
.studio-settings-sidebar .studio-text-input--compact {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .studio-settings-sidebar .studio-select--compact,
html[data-theme="light"] .studio-settings-sidebar .studio-text-input--compact {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

.studio-settings-sidebar-footer {
  flex-shrink: 0;
  padding: 0.7rem 0.75rem 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  background: color-mix(in srgb, var(--panel) 75%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.studio-vocal-status--sidebar {
  margin: 0 !important;
  font-size: 0.75rem;
  line-height: 1.4;
}

.studio-remix-dl-row--sidebar {
  margin-top: 0 !important;
  max-height: 7rem;
  overflow-y: auto;
}

.btn-studio--create-sidebar {
  width: 100%;
  justify-content: center;
  padding: 0.88rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #ff8f4a 0%, #ff5520 48%, #ff3d6a 130%);
  color: #fff;
  box-shadow:
    0 4px 20px rgba(255, 85, 32, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition:
    filter 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease;
}

.btn-studio--create-sidebar:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    0 6px 28px rgba(255, 85, 32, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.btn-studio--create-sidebar:active:not(:disabled) {
  transform: scale(0.992);
}

.btn-studio--create-sidebar:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.25);
}

/* Re-open when panel minimized (desktop Studio only) */
.studio-settings-panel-expand {
  display: none;
  position: fixed;
  z-index: 29;
  left: calc(var(--sidebar-w) - 1px);
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-left: 4px;
  border-radius: 0 12px 12px 0;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
  border-left: none;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 4px 4px 24px rgba(0, 0, 0, 0.2);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.2s ease;
}

.studio-settings-panel-expand:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--elevated) 92%, transparent);
}

html.studio-settings-panel-collapsed body:has(#viewStudio:not(.hidden)) .studio-settings-panel-expand:not(.hidden) {
  display: flex;
}

@media (max-width: 768px) {
  .studio-settings-panel-expand {
    display: none !important;
  }
}

.studio-workspace-page {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
  min-height: min(72vh, calc(100vh - 240px));
}

.studio-ws-page-head {
  flex-shrink: 0;
  padding: 0 0.15rem;
}

.studio-ws-breadcrumb {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.studio-workspace-page .studio-workspace.card-block {
  flex: 1;
  min-height: 0;
  margin: 0;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.studio-page-head--compact {
  margin: 0 0 0.15rem;
  padding: 0 clamp(0.65rem, 2.5vw, 1rem);
}

.studio-page-head--compact .studio-page-title {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.studio-page-head--compact .studio-page-lead {
  max-width: 56rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.studio-page-head {
  margin: 0 0 0.25rem;
}

.studio-page-title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.studio-page-lead {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52rem;
}

.studio-project-bar {
  margin-top: 0.15rem;
}

.studio-project-combo-wrap {
  position: relative;
  width: 100%;
}

.studio-project-combo-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.studio-project-combo-btn:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(255, 255, 255, 0.03);
}

.studio-project-combo-thumb-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(37, 99, 235, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-project-combo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-project-combo-thumb-ph {
  font-size: 1.1rem;
  color: var(--muted);
}

.studio-project-combo-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-project-combo-chev {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.85;
}

.studio-project-combo-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(320px, 52vh);
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--dropdown);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  padding: 0.35rem;
}

.studio-project-combo-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.5rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.studio-project-combo-option:hover,
.studio-project-combo-option:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.studio-project-combo-opt-thumb-wrap {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-project-combo-opt-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-project-combo-opt-ph {
  font-size: 1rem;
  color: var(--muted);
}

.studio-project-combo-opt-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.studio-project-combo-section-label {
  margin: 0.15rem 0.35rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.studio-project-combo-option--close {
  color: var(--danger, #ff5c5c);
  font-weight: 600;
}

.studio-project-combo-option--close:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  color: var(--muted);
}

.studio-project-combo-option--close:not(:disabled):hover,
.studio-project-combo-option--close:not(:disabled):focus-visible {
  background: rgba(255, 92, 92, 0.12);
}

.studio-workspace--rel {
  position: relative;
}

.studio-ws-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.studio-ws-art.studio-daw-art-wrap {
  width: 80px;
  height: 80px;
  border-radius: 12px;
}

.studio-ws-head-main {
  flex: 1;
  min-width: 0;
}

.studio-ws-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.studio-ws-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
  line-height: 1.45;
}

.studio-ws-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.3rem 0 0;
  line-height: 1.4;
  min-height: 1.25em;
}

.studio-ws-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}

.studio-ws-transport-row {
  margin-bottom: 0.2rem;
}

.studio-ws-transport-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
}

.studio-ws-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.studio-ws-ruler-row {
  display: grid;
  grid-template-columns: 56px minmax(140px, min(28vw, 220px)) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: end;
  padding: 0 0.15rem;
  min-width: 0;
}

.studio-ws-ruler-meter-spacer {
  width: 100%;
  min-height: 1px;
}

.studio-ws-ruler {
  position: relative;
  height: 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 2px;
}

.studio-ruler-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.studio-ruler-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.studio-ws-transport.studio-daw-transport {
  margin-bottom: 0.65rem;
}

.link-as-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: #ff9f5a;
  cursor: pointer;
  text-decoration: underline;
}

.link-as-btn:hover {
  filter: brightness(1.08);
}

/* ——— Studio DAW ——— */
.studio-daw-art-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--panel);
}

.studio-daw-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-daw-cover-ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--muted);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(37, 99, 235, 0.2));
}

.studio-daw-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-bottom: 1rem;
}

.studio-daw-progress-outer {
  position: relative;
  flex: 1 1 180px;
  min-height: 8px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
}

.studio-daw-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  pointer-events: none;
  will-change: transform;
}

.studio-daw-time {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 7.5rem;
}

.studio-daw-zoom-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.studio-daw-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.studio-daw-zoom-readout {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  min-width: 2.85rem;
  text-align: center;
  font-weight: 600;
}

.btn-studio--zoom {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--text);
  cursor: pointer;
}

.btn-studio--zoom:hover:not(:disabled) {
  border-color: rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
}

.btn-studio--zoom:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.studio-daw-master {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.studio-daw-master-lbl {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.studio-daw-master input[type="range"] {
  width: 100px;
  accent-color: #a855f7;
}

.studio-daw-tracks {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.studio-daw-row {
  display: grid;
  grid-template-columns: 56px minmax(140px, min(28vw, 220px)) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  min-width: 0;
}

.studio-daw-meter-col {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  align-content: flex-start;
  gap: 0.3rem 0.35rem;
  min-width: 0;
  max-width: 52px;
}

.studio-daw-meter-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.5rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
  font-variant-numeric: tabular-nums;
  min-height: 64px;
  padding-right: 1px;
  flex: 0 0 auto;
}

.studio-daw-meter-scale span {
  display: block;
}

.studio-daw-meter {
  position: relative;
  width: 14px;
  min-height: 64px;
  height: 64px;
  border-radius: 4px;
  background: #2a2a2e;
  border: 1px solid rgba(0, 0, 0, 0.45);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.studio-daw-meter::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: #7f1d1d;
  z-index: 1;
  opacity: 0.95;
  pointer-events: none;
}

.studio-daw-meter-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  height: 100%;
  transform-origin: bottom center;
  transform: scaleY(0);
  border-radius: 0 0 3px 3px;
  z-index: 0;
  background: linear-gradient(
    0deg,
    #14532d 0%,
    #166534 12%,
    #15803d 28%,
    #22c55e 48%,
    #84cc16 62%,
    #eab308 78%,
    #f97316 90%,
    #ef4444 100%
  );
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.22);
  will-change: transform;
}

.studio-daw-meter-db {
  flex: 0 0 100%;
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-daw-loading {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: inherit;
}

.studio-daw-loading-inner {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.studio-daw-loading-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.studio-daw-loading-bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

.studio-daw-loading-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--gradient-h);
  /* Width driven by JS lerp in studioDawSetLoading — avoid CSS width transition (double-smoothing). */
  will-change: width;
}

.studio-daw-loading-sub {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .studio-daw-row,
  .studio-ws-ruler-row {
    grid-template-columns: 48px minmax(100px, 1fr) minmax(0, 2.5fr);
    gap: 0.5rem 0.65rem;
  }
}

@media (max-width: 800px) {
  .studio-daw-row,
  .studio-ws-ruler-row {
    grid-template-columns: 1fr;
  }
  .studio-ws-ruler-gutter {
    display: none;
  }
  .studio-ws-ruler-meter-spacer {
    display: none;
  }
}

.studio-daw-row-side {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.studio-daw-row-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.studio-daw-stripe {
  width: 4px;
  height: 1.1em;
  border-radius: 3px;
  flex-shrink: 0;
}

.studio-daw-row--vocals .studio-daw-stripe {
  background: linear-gradient(180deg, #a855f7, #7c3aed);
}
.studio-daw-row--drums .studio-daw-stripe {
  background: linear-gradient(180deg, #ea580c, #c2410c);
}
.studio-daw-row--bass .studio-daw-stripe {
  background: linear-gradient(180deg, #16a34a, #15803d);
}
.studio-daw-row--synth .studio-daw-stripe {
  background: linear-gradient(180deg, #22d3ee, #0891b2);
}

.studio-daw-row--other .studio-daw-stripe {
  background: linear-gradient(180deg, #a855f7, #7c3aed);
}

.studio-daw-toggles {
  display: flex;
  gap: 0.35rem;
}

.studio-daw-tog {
  min-width: 28px;
  height: 28px;
  padding: 0 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--elevated);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.studio-daw-tog.is-on {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

.studio-daw-mute.is-on {
  color: #f87171;
}

.studio-daw-solo.is-on {
  color: #c084fc;
}

.studio-daw-vol {
  width: 100%;
  max-width: 200px;
  accent-color: #a855f7;
}

.studio-daw-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.studio-daw-wave-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  min-height: 64px;
  align-self: center;
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #0c0c14;
  border: 1px solid var(--border);
}

/* One shared horizontal scroll: JS syncs scrollLeft; only the bottom strip shows the scrollbar. */
.studio-daw-tracks .studio-daw-row:not(:last-child) .studio-daw-wave-wrap {
  scrollbar-width: none;
}
.studio-daw-tracks .studio-daw-row:not(:last-child) .studio-daw-wave-wrap::-webkit-scrollbar {
  height: 0;
  width: 0;
}
.studio-daw-tracks .studio-daw-row:last-child .studio-daw-wave-wrap {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.studio-daw-canvas {
  display: block;
  vertical-align: top;
  cursor: pointer;
  min-height: 64px;
}

.studio-daw-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}

.studio-daw-empty.hidden {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .main-column {
    margin-left: 0;
    padding-top: 52px;
  }

  body:has(#viewStudio:not(.hidden)) .main-column {
    margin-left: 0;
    padding-top: calc(52px + min(34vh, 240px));
  }

  body:has(#viewStudio:not(.hidden)) .studio-settings-sidebar {
    display: flex;
    left: 0;
    right: 0;
    top: 52px;
    width: 100% !important;
    max-width: none;
    bottom: auto;
    height: auto;
    max-height: min(34vh, 240px);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  body:has(#viewStudio:not(.hidden)) .studio-settings-sidebar-scroll {
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
  }

  .bottom-inner {
    padding-left: 1rem;
  }
}

/* ——— Studio stem replace modal ——— */
.modal-overlay--stem-replace {
  z-index: 210;
}

.modal-card--stem-replace {
  max-width: min(100%, 500px);
  max-height: min(88vh, 720px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.studio-replace-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.studio-replace-tab {
  flex: 1;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.studio-replace-tab--active {
  border-color: rgba(168, 85, 247, 0.45);
  color: var(--text);
  background: var(--elevated);
}

.studio-replace-ai-lead {
  margin: 0 0 0.5rem !important;
  font-size: 0.84rem;
}

.studio-replace-vocal-ai-lead {
  margin: 0 0 0.65rem !important;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}

.studio-replace-vocal-ai-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.studio-layer-remix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.65rem;
}

.studio-layer-remix-sliders {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.45rem;
  align-items: center;
}

.studio-replace-file-hint {
  margin-bottom: 0.55rem !important;
  font-size: 0.84rem;
}

.modal-actions--stem-replace {
  margin-top: 0.25rem;
}

.modal-card--studio-save {
  max-width: 420px;
}

.studio-save-when {
  font-variant-numeric: tabular-nums;
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-weight: 600;
}

.modal-card--storage-quota {
  max-width: 460px;
  width: min(100%, 460px);
}

.modal-body--muted {
  font-size: 0.9rem;
  opacity: 0.88;
  margin-top: 0.65rem;
}

.studio-save-hint {
  margin-bottom: 0;
}

.studio-replace-lead {
  margin-bottom: 1rem;
}

.studio-replace-dropzone {
  position: relative;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  padding: 1.35rem 1rem;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.studio-replace-dropzone:focus-visible {
  outline: 2px solid rgba(168, 85, 247, 0.6);
  outline-offset: 2px;
}

.studio-replace-dropzone.is-dragover {
  border-color: rgba(168, 85, 247, 0.65);
  background: rgba(168, 85, 247, 0.08);
}

.studio-replace-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.studio-replace-drop-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
}

.studio-replace-drop-inner .studio-replace-browse {
  pointer-events: auto;
}

.studio-replace-icon {
  display: flex;
  color: rgba(168, 85, 247, 0.85);
  margin-bottom: 0.15rem;
}

.studio-replace-headline {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.studio-replace-or {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.studio-replace-browse {
  margin-top: 0.15rem;
  cursor: pointer;
  display: inline-flex;
}

.studio-replace-filename {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
  max-width: 100%;
}

/* ——— Premier / credit packs modal ——— */
.modal-card--premier {
  max-width: 920px;
  max-height: min(90vh, 720px);
  overflow-y: auto;
}

.premier-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.premier-modal-head .modal-title {
  margin-bottom: 0;
}

.btn-premier-x {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 10px;
  background: var(--panel-2, rgba(255, 255, 255, 0.06));
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.btn-premier-x:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.premier-lead {
  margin-top: 0;
}

.premier-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}

@media (max-width: 720px) {
  .premier-packages {
    grid-template-columns: 1fr;
  }
}

.premier-pack {
  position: relative;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.premier-pack--popular {
  border-color: rgba(255, 75, 139, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.15);
}

.premier-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
}

.premier-pack-top {
  margin-bottom: 0.35rem;
}

.premier-credits-amt {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.premier-credits-unit {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.premier-price {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.premier-hint {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.35;
}

.btn-premier-buy {
  margin-top: auto;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-premier-buy:hover {
  border-color: rgba(255, 75, 139, 0.5);
  background: rgba(255, 75, 139, 0.08);
}

.btn-premier-buy--primary {
  border: none;
  background: var(--gradient);
  color: #fff;
}

.btn-premier-buy--primary:hover {
  filter: brightness(1.08);
  background: var(--gradient);
}

.premier-checkout-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
  text-align: center;
}

/* ——— Admin (szoboszlaif@gmail.com only) ——— */
.nav-item--admin {
  border-left: 2px solid rgba(255, 75, 139, 0.45);
}

.admin-stats {
  margin-bottom: 1.25rem;
}

.admin-stat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text);
}

.admin-stat-pill strong {
  font-weight: 700;
  color: var(--text);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.admin-tab {
  box-sizing: border-box;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.admin-tab:hover {
  border-color: rgba(255, 75, 139, 0.45);
}

.admin-tab.active {
  border: none;
  padding: calc(0.45rem + 1px) calc(0.9rem + 1px);
  background: rgba(255, 75, 139, 0.12);
}

.admin-panel {
  min-height: 4rem;
}

.admin-panel-loading,
.admin-panel-error {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-panel-error {
  color: #f87171;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-table th {
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-td-mono {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-td-filename {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-td-err {
  max-width: 18rem;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-word;
}

.admin-credits-input {
  width: 5.5rem;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.btn-admin-save {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 75, 139, 0.15);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-admin-save:hover {
  filter: brightness(1.08);
}

.admin-status {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-status--queued,
.admin-status--processing {
  background: rgba(255, 75, 139, 0.15);
  color: #ff9f5a;
}

.admin-status--completed {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.admin-status--failed {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.admin-users-toolbar {
  margin: 0 0 1rem;
}

.admin-user-search {
  width: min(100%, 22rem);
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.admin-panel-mail {
  max-width: 28rem;
}

.admin-mail-intro {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.admin-mail-code {
  font-size: 0.82em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.admin-mail-hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
  opacity: 0.9;
}

.admin-mail-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-mail-field--block {
  display: block;
}

.admin-api-seg-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.admin-api-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-width: 32rem;
}

.admin-api-seg__btn {
  box-sizing: border-box;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.admin-api-seg__btn:hover {
  border-color: rgba(255, 75, 139, 0.45);
}

.admin-api-seg__btn--active {
  border-color: rgba(255, 75, 139, 0.55);
  background: rgba(255, 75, 139, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 75, 139, 0.2);
}

.admin-api-seg__title {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.admin-api-seg__sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.admin-api-seg__btn--active .admin-api-seg__sub {
  color: var(--text);
  opacity: 0.85;
}

.admin-api-seg-foot {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 32rem;
}

.admin-mail-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-mail-field input {
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.admin-mail-field input:focus {
  outline: none;
  border-color: rgba(255, 75, 139, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 75, 139, 0.1);
}

.admin-mail-form-msg {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--muted);
}

.admin-mail-form-msg--err {
  color: #f87171;
  font-weight: 600;
}

.admin-mail-form-msg--ok {
  color: #4ade80;
  font-weight: 600;
}

.admin-mail-test-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem;
}

.admin-mail-field--grow {
  flex: 1 1 12rem;
  min-width: 0;
}

.admin-mail-test-row .btn-modal-secondary {
  flex: 0 0 auto;
  margin-bottom: 0.05rem;
}

.admin-mail-actions {
  margin-top: 0.25rem;
}

.admin-rvc-h {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.admin-rvc-create-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: end;
  margin-bottom: 1rem;
}

.admin-user-search::placeholder {
  color: var(--muted);
}

.admin-user-search:focus {
  outline: none;
  border-color: rgba(255, 75, 139, 0.45);
  box-shadow: 0 0 0 2px rgba(255, 75, 139, 0.12);
}

.admin-td-actions {
  white-space: nowrap;
}

.admin-td-actions .btn-admin-edit {
  margin-right: 0.35rem;
}

.admin-td-actions .admin-track-row-actions .btn-admin-edit {
  margin-right: 0;
}

.admin-td-actions .admin-user-row-actions .btn-admin-edit {
  margin-right: 0;
}

.admin-user-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.modal-card--admin-user-stats {
  max-width: 520px;
  width: min(100%, 520px);
  max-height: min(90vh, 760px);
  overflow-y: auto;
}

.admin-user-stats-body {
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-user-stats-id {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

.admin-user-stats-dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(7.5rem, 40%) 1fr;
  gap: 0.5rem 0.85rem;
}

.admin-user-stats-dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.admin-user-stats-dl dd {
  margin: 0;
}

.admin-user-stats-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.admin-user-stats-sub {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.admin-track-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-track-modal-tabs {
  margin: -0.15rem 0 0.85rem;
}

.admin-track-modal-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-track-support-lead {
  margin: 0;
}

.btn-admin-track-support {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-admin-track-support:hover {
  border-color: rgba(255, 75, 139, 0.45);
}

.admin-user-pro {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 75, 139, 0.18);
  color: #ffb8d4;
}

.btn-admin-edit {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-admin-edit:hover {
  filter: brightness(1.08);
}

.modal-card--admin-user {
  max-width: 440px;
  width: min(100%, 440px);
  max-height: min(90vh, 640px);
  overflow-y: auto;
}

.modal-card--admin-delete-confirm {
  position: relative;
  max-width: 420px;
  width: min(100%, 420px);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 72, 124, 0.12);
  background: linear-gradient(165deg, rgba(28, 28, 36, 0.98) 0%, rgba(18, 18, 24, 0.99) 100%);
}

.admin-delete-confirm-accent {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, #e8487c, #ff6b9d, #a855f7);
  opacity: 0.95;
}

.modal-card--admin-delete-confirm > .admin-delete-confirm-head {
  padding: 1rem 1.15rem 0.6rem;
  margin-bottom: 0;
  box-sizing: border-box;
}

.modal-card--admin-delete-confirm > .admin-delete-confirm-head .modal-title {
  padding-right: 0.5rem;
  line-height: 1.25;
}

.admin-delete-confirm-body {
  padding: 0 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-delete-confirm-lead {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

.admin-delete-confirm-label {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.admin-delete-confirm-email-chip {
  font-size: 0.9rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-all;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(255, 75, 139, 0.1);
  border: 1px solid rgba(255, 75, 139, 0.22);
  color: var(--text);
}

.admin-delete-confirm-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-delete-confirm-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-delete-confirm-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.admin-delete-confirm-field input:focus {
  outline: none;
  border-color: rgba(255, 75, 139, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 75, 139, 0.12);
}

.admin-delete-confirm-field input::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.admin-delete-confirm-error {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f87171;
  line-height: 1.4;
}

.modal-actions--delete-confirm {
  margin-top: 0.35rem;
  justify-content: flex-end;
  gap: 0.65rem;
}

.btn-modal-danger {
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #e8487c 0%, #be185d 100%);
  box-shadow: 0 4px 14px rgba(232, 72, 124, 0.35);
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

.btn-modal-danger:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 6px 18px rgba(232, 72, 124, 0.42);
}

.btn-modal-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.admin-user-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-user-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
}

.admin-user-field span:first-child {
  color: var(--muted);
  font-weight: 600;
}

.admin-user-field input[type="email"],
.admin-user-field input[type="text"],
.admin-user-field input[type="number"],
.admin-user-field input[type="password"] {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.admin-user-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.admin-user-fieldset {
  margin: 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.admin-user-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-user-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.modal-card--admin-track {
  max-width: 560px;
  width: min(100%, 560px);
  max-height: min(92vh, 900px);
  overflow-y: auto;
}

.admin-track-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-track-readonly {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  word-break: break-word;
}

.admin-track-muted {
  display: inline-block;
  min-width: 5.5rem;
  color: var(--muted);
  font-weight: 600;
}

.admin-track-code {
  font-size: 0.75rem;
  word-break: break-all;
}

.admin-track-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.admin-track-stem-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}

.admin-track-stem-grid-label {
  width: 100%;
  font-size: 0.78rem;
  margin-bottom: 0.15rem;
}

@media (min-width: 420px) {
  .admin-track-stem-grid-label {
    width: auto;
    margin-bottom: 0;
    margin-right: 0.25rem;
  }
}

.btn-admin-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 75, 139, 0.12);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-admin-download:hover {
  filter: brightness(1.08);
}

.btn-admin-download--sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.78rem;
}

.admin-dl-disabled {
  pointer-events: none;
  opacity: 0.42;
}

.modal-actions--admin-track {
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.btn-admin-track-delete {
  margin-right: auto;
}

.modal-actions--admin-user {
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.admin-user-modal-save-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

/** Users table — same chrome as Edit; distinct label only */
.btn-admin-delete {
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--red-deep, #e8487c);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.btn-admin-delete:hover {
  filter: brightness(1.08);
  color: #ff6b9d;
}

.modal-actions--admin-user .btn-admin-delete-label {
  color: var(--red-deep, #e8487c);
  border-color: rgba(232, 72, 124, 0.35);
}

.modal-actions--admin-user .btn-admin-delete-label:hover {
  color: #ff6b9d;
  background: rgba(232, 72, 124, 0.08);
}

.admin-track-save-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-left: auto;
}

.admin-track-job-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.25rem 0 0.5rem;
}

.admin-track-job-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.admin-track-status-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: var(--surface);
  border: 1px solid var(--border);
}

.admin-track-status-pill--completed {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(22, 163, 74, 0.1);
}

.admin-track-status-pill--processing,
.admin-track-status-pill--queued {
  color: #ca8a04;
  border-color: rgba(202, 138, 4, 0.45);
  background: rgba(202, 138, 4, 0.12);
}

.admin-track-status-pill--failed {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
}

.admin-track-sub-err {
  font-size: 0.72rem;
  color: var(--muted);
  flex: 1 1 100%;
  max-width: 100%;
  word-break: break-word;
}

.admin-track-progress-hint {
  display: block;
  margin-top: 0.2rem;
  white-space: pre-wrap;
  font-size: 0.72rem;
  line-height: 1.35;
}

.admin-track-logs-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.admin-track-log-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.admin-track-log-title {
  margin: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .admin-track-log-title {
  background: rgba(255, 255, 255, 0.06);
}

.admin-track-log-pre {
  margin: 0;
  padding: 0.45rem 0.5rem;
  max-height: 180px;
  overflow: auto;
  font-size: 0.68rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.btn-admin-track-refresh {
  font-size: 0.82rem;
}

.btn-admin-track-refund {
  margin-top: 0.75rem;
}

.admin-track-refund-result {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Create: waveform — full width so WaveSurfer can measure clientWidth when layout changes */
.waveform-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  overflow: hidden;
}
.waveform-shell .waveform-box {
  border-radius: 12px;
}

/* Live chord — own row under waveform, horizontally centered */
.stem-chord-rail {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.65rem;
  pointer-events: none;
}
.stem-chord-hero {
  max-width: min(100%, 22rem);
}

#waveformMetaStrip.stem-meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 560px) {
  .stem-chips-bar {
    grid-template-columns: 1fr;
  }
  #waveformMetaStrip.stem-meta-tags {
    justify-content: center;
  }
}
/* Same footprint for Key and BPM pills */
.stem-meta-tags .meta-chip {
  box-sizing: border-box;
  min-width: 7.25rem;
  min-height: 2rem;
  padding: 0.28rem 0.5rem;
  justify-content: center;
  font-size: 0.72rem;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(15, 23, 42, 0.55);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
[data-theme="light"] .meta-chip {
  background: rgba(255, 255, 255, 0.82);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
}
.meta-chip-key::before {
  content: "Key · ";
  opacity: 0.75;
  font-weight: 500;
}
.meta-chip-bpm::before {
  content: "BPM · ";
  opacity: 0.75;
  font-weight: 500;
}
.stem-chord-hero.waveform-chord-pill {
  flex-direction: row;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.42rem 0.85rem 0.48rem;
}
.waveform-chord-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 0.45rem 0.65rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(99, 102, 241, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .waveform-chord-pill {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(99, 102, 241, 0.12));
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}
.waveform-chord-kicker {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
}
.stem-chord-hero .waveform-chord-kicker {
  font-size: 0.62rem;
}
[data-theme="light"] .waveform-chord-kicker {
  color: rgba(15, 23, 42, 0.55);
}
.waveform-chord-text {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.stem-chord-hero .waveform-chord-text {
  font-size: 1.45rem;
}
[data-theme="light"] .waveform-chord-text {
  color: #0f172a;
  text-shadow: none;
}
.stem-extract-dl-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  min-width: 4.5rem;
}
.stem-extract-dl-stack .stem-dl-btn {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.28rem 0.4rem;
  border-radius: 8px;
}
.stem-analysis-done-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
