:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #15171a;
  --muted: #626a73;
  --line: #d8dde3;
  --pink: #d93468;
  --green: #23895d;
  --orange: #b85f1b;
  --shadow: 0 16px 50px rgba(26, 31, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, rgba(217, 52, 104, 0.08), transparent 360px), var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--pink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: 0;
}

.lede {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.music-mark {
  height: 220px;
  border-radius: 8px;
  background: #111318;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.music-mark span {
  position: absolute;
  bottom: 34px;
  width: 34px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(180deg, #ff5b8f, #f8b044);
}

.music-mark span:nth-child(1) {
  left: 54px;
  height: 120px;
}

.music-mark span:nth-child(2) {
  left: 112px;
  height: 166px;
  background: linear-gradient(180deg, #6ad58f, #43a0ff);
}

.music-mark span:nth-child(3) {
  left: 170px;
  height: 92px;
  background: linear-gradient(180deg, #f8d34f, #ff6a3d);
}

.workspace,
.results-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 18px;
}

.results-grid,
.status-panel {
  margin-top: 18px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title span,
#platform-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#platform-badge[data-tone="red"] {
  color: #bc2449;
  background: rgba(217, 52, 104, 0.12);
}

#platform-badge[data-tone="green"] {
  color: var(--green);
  background: rgba(35, 137, 93, 0.12);
}

#platform-badge[data-tone="orange"] {
  color: var(--orange);
  background: rgba(184, 95, 27, 0.13);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  color: #343a40;
  font-size: 14px;
  font-weight: 650;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  outline: none;
  padding: 12px 13px;
  resize: vertical;
}

textarea:focus,
input:focus {
  border-color: rgba(217, 52, 104, 0.65);
  box-shadow: 0 0 0 3px rgba(217, 52, 104, 0.12);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button,
.link-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}

button.secondary,
.link-button.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

button:disabled,
.link-button.disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.icon {
  font-family: "SF Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.playlist-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.playlist-meta div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.playlist-meta span,
.track-row span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.playlist-meta strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: center;
}

#status-text {
  margin: 6px 0 0;
  color: var(--muted);
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--pink);
}

.track-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
}

.track-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.track-row.unmatched {
  opacity: 0.62;
}

.track-row strong,
.track-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-art {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #f3d34a, #d93468);
  color: #fff;
  font-weight: 800;
}

.empty {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .results-grid,
  .status-line {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 14px;
  }

  .music-mark {
    height: 130px;
  }

  .playlist-meta {
    grid-template-columns: 1fr;
  }
}
