:root {
  --bg: #101214;
  --bg-elevated: #161a1d;
  --panel: #1b2025;
  --panel-alt: #212a30;
  --text: #eae6de;
  --muted: #b4b0aa;
  --line: rgba(255,255,255,0.08);
  --gold: #d4b06a;
  --purple: #7d7aed;
  --blue: #7bb7ff;
  --shadow: rgba(0,0,0,0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--text);
  font-family: "Inter", sans-serif;
}

img {
  max-width: 100%;
}

a {
  color: var(--gold);
  text-decoration: none;
}

p {
  line-height: 1.7;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16,18,20,0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,176,106,0.5), rgba(125,122,237,0.4), transparent);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #9d7d42);
  color: #111;
  font-size: 0.9rem;
}

.main-nav {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 2.5rem;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(212,176,106,0.32), transparent 70%);
  top: -180px;
  left: -120px;
}

.hero::after {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(125,122,237,0.28), transparent 70%);
  bottom: -220px;
  right: -160px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

@keyframes hero-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-copy > * {
  animation: hero-fade-up 0.6s ease both;
}

.hero-copy .eyebrow {
  animation-delay: 0s;
}

.hero-copy h1 {
  animation-delay: 0.06s;
}

.hero-copy .subtitle {
  animation-delay: 0.12s;
}

.hero-copy .cta-row {
  animation-delay: 0.18s;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-size: 0.74rem;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 5vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin: 0;
  background: linear-gradient(135deg, var(--text) 30%, var(--gold) 65%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 38rem;
  margin-top: 1rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.9rem 1.25rem;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #d0a750);
  color: #181611;
  box-shadow: 0 10px 25px rgba(212, 176, 106, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(212, 176, 106, 0.35);
}

.btn-secondary {
  border-color: var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: rgba(212,176,106,0.08);
}

.hero-panel .panel-card,
.card,
.tool-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 20px 44px var(--shadow);
}

.panel-card {
  padding: 1.5rem;
}

.panel-card span {
  color: var(--muted);
  display: inline-block;
  margin-bottom: 1rem;
}

.panel-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
  color: var(--text);
}

.home-hero {
  padding-bottom: 3.5rem;
}

.home-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.home-benefits li::before {
  content: "\2713";
  color: var(--gold);
  font-weight: 700;
  margin-right: 0.45rem;
}

.home-tool-panel {
  padding: 1.65rem;
}

.panel-label {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-tool-panel h2 {
  margin: 0 0 1.35rem;
  font-size: 1.5rem;
  line-height: 1.2;
}

.home-tool-list {
  display: grid;
  gap: 0.5rem;
}

.home-tool-list a {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  transition: 0.2s ease;
}

.home-tool-list a > span {
  margin-bottom: 0;
}

.home-tool-list a:hover {
  transform: translateX(4px);
  border-color: rgba(212, 176, 106, 0.45);
  background: rgba(212, 176, 106, 0.08);
}

.home-tool-list a > span:last-child {
  color: var(--gold);
}

.tool-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  color: var(--gold);
  background: rgba(212, 176, 106, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
}

.section-block {
  padding: 2rem 0 4rem;
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.home-section-heading {
  max-width: 46rem;
}

.home-section-heading p:last-child {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.left-align {
  text-align: left;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.tool-card {
  padding: 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 176, 106, 0.4);
  box-shadow: 0 26px 52px rgba(0,0,0,0.42);
}

.tool-card.large {
  min-height: 230px;
}

.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(125, 122, 237, 0.12);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.tool-grid .tool-card:nth-child(3n+1) .tool-icon {
  background: linear-gradient(135deg, rgba(212, 176, 106, 0.22), rgba(212, 176, 106, 0.06));
}

.tool-grid .tool-card:nth-child(3n+2) .tool-icon {
  background: linear-gradient(135deg, rgba(125, 122, 237, 0.22), rgba(125, 122, 237, 0.06));
}

.tool-grid .tool-card:nth-child(3n+3) .tool-icon {
  background: linear-gradient(135deg, rgba(123, 183, 255, 0.22), rgba(123, 183, 255, 0.06));
}

.tool-card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.tool-card:has(.track-library-removed) {
  display: none;
}

.tool-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.tool-card a {
  color: var(--gold);
  font-weight: 600;
}

.narrow {
  max-width: 900px;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
}

.form-card {
  background: rgba(255,255,255,0.01);
}

.upload-form {
  display: grid;
  gap: 1rem;
}

.field-label {
  font-weight: 600;
}

input[type="file"],
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.full-width {
  width: 100%;
}

.result-card {
  margin-top: 1.5rem;
}

.bpm-result {
  text-align: center;
}

.bpm-value {
  margin: 0.4rem 0 1rem;
  color: var(--gold);
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}

.bpm-value span {
  color: var(--muted);
  font-size: 0.22em;
  letter-spacing: 0.02em;
}

.small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.audio-preview {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: rgba(255,255,255,0.02);
}

.wave-editor {
  margin-top: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.wave-toolbar,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.wave-toolbar {
  padding: 0.35rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  width: fit-content;
}

.wave-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.wave-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(123,183,255,0.45);
  background: rgba(123,183,255,0.08);
  color: #f5f7ff;
}

.wave-icon-btn:active {
  transform: translateY(0);
}

.wave-icon-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 0.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wave-icon-btn[title="Play selection"] svg,
.wave-icon-btn[title="Play full track"] svg {
  fill: currentColor;
  stroke: none;
}

.btn-small {
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
}

.wave-surface {
  position: relative;
  height: 180px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10,12,15,0.85), rgba(16,18,20,0.94));
  overflow: hidden;
}

.wave-surface canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.selection-bar strong {
  color: var(--gold);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.preview-label {
  display: block;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.audio-preview audio {
  width: 100%;
}

.progress-shell {
  margin-top: 0.6rem;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.progress-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.progress-spinner {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: var(--gold);
  display: inline-block;
  animation: spinner-rotate 0.85s linear infinite;
}

.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0;
}

.progress-message {
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1.1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-percent {
  min-width: 3.5rem;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.progress-track {
  position: relative;
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  overflow: hidden;
}

.process-form[data-live-progress="vocal-remover"] .progress-track {
  display: none;
}

.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--gold), var(--blue));
  transition: width 0.35s ease;
}

.progress-bar.is-indeterminate {
  width: 35%;
  animation: progress-shimmer 1.2s ease-in-out infinite alternate;
}

@keyframes progress-shimmer {
  0% {
    transform: translateX(-12%) scaleX(0.9);
    opacity: 0.8;
  }
  100% {
    transform: translateX(120%) scaleX(1.1);
    opacity: 1;
  }
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.music-knowledge {
  margin-top: 0.9rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  line-height: 1.5;
}

.music-knowledge strong {
  color: var(--gold);
}

.hidden {
  display: none !important;
}

.bullet-list {
  margin: 1rem 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.legal-page h1 {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 3rem;
  background: rgba(255,255,255,0.01);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h3,
.site-footer h4 {
  margin-top: 0;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

@media (max-width: 760px) {
  .tool-grid,
  .tool-layout,
  .footer-grid,
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .nav-shell {
    flex-direction: column;
    justify-content: center;
    padding: 1rem 0;
  }

  .main-nav {
    justify-content: center;
  }

  .hero {
    padding-top: 2.5rem;
  }
}

.karaoke-filter-card {
  margin-bottom: 1.25rem;
}

.karaoke-filter-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.karaoke-filter-actions {
  margin-bottom: 0;
}

input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.karaoke-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.karaoke-track-list {
  display: grid;
  gap: 0.6rem;
}

.karaoke-track-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.karaoke-track-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.karaoke-track-info strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.karaoke-track-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-midi {
  background: rgba(125, 122, 237, 0.16);
  color: #beb9ff;
}

.badge-audio {
  background: rgba(123, 183, 255, 0.16);
  color: var(--blue);
}

.karaoke-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.karaoke-page-indicator {
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .karaoke-filter-form {
    grid-template-columns: 1fr;
  }

  .karaoke-track-row {
    flex-wrap: wrap;
  }
}

.stack-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0;
}

.stack-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.stack-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.stack-row-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.stack-row-actions {
  display: flex;
  gap: 0.4rem;
}

.chip-key {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(212, 176, 106, 0.16);
  color: var(--gold);
  white-space: nowrap;
}

.task-done {
  text-decoration: line-through;
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
  padding: 0.5rem 0 1rem;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
}

.inline-form input {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}

.stem-toolbar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem;
  margin: 1rem 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  width: fit-content;
}

.stem-time {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0 0.5rem;
  font-variant-numeric: tabular-nums;
}

.stem-mixer {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.stem-select-list {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(255,255,255,0.02);
}

.stem-select-list h4 {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.stem-list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.stem-list-item:hover {
  border-color: var(--line);
  background: rgba(255,255,255,0.03);
}

.stem-list-item.is-solo {
  border-color: var(--gold);
  background: rgba(212, 176, 106, 0.1);
  color: var(--gold);
}

.stem-list-item.is-muted {
  color: var(--muted);
}

.stem-tracks {
  display: grid;
  gap: 0.7rem;
}

.stem-track-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: rgba(255,255,255,0.02);
}

.stem-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stem-track-label {
  font-weight: 600;
}

.stem-track-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stem-download-btn,
.stem-mute-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s ease;
}

.stem-download-btn:hover,
.stem-mute-btn:hover {
  border-color: rgba(123,183,255,0.45);
  color: var(--text);
}

.stem-mute-btn.is-muted {
  color: #ff7a59;
  border-color: rgba(255, 122, 89, 0.4);
}

.stem-waveform-wrap {
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
}

.stem-waveform {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

@media (max-width: 760px) {
  .stem-mixer {
    grid-template-columns: 1fr;
  }
}



