:root {
  --bg: #f4efe4;
  --paper: rgba(255, 252, 245, 0.92);
  --ink: #192126;
  --muted: #5f6a70;
  --accent: #ff6b35;
  --accent-2: #1db954;
  --border: rgba(25, 33, 38, 0.12);
  --shadow: 0 20px 50px rgba(25, 33, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 107, 53, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(29, 185, 84, 0.18), transparent 22%),
    linear-gradient(180deg, #f8f2e8 0%, var(--bg) 100%);
  min-height: 100vh;
}

a {
  color: inherit;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92em;
}

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

.hero,
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero {
  padding: 36px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--muted);
}

.hero h1 {
  margin: 0;
  max-width: 10ch;
  font-family: "Instrument Serif", serif;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.96;
  font-weight: 400;
}

.lede {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.panel {
  padding: 26px;
  margin-top: 18px;
}

.panel.muted {
  background: rgba(255, 252, 245, 0.7);
}

.panel-heading h2 {
  margin: 0 0 8px;
}

.panel-heading p {
  margin: 0 0 18px;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: white;
}

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  background: white;
  resize: vertical;
}

.button,
.button:visited {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.button:hover {
  filter: brightness(1.05);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.button.spotify {
  background: var(--accent-2);
  color: #07130c;
}

.button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.pill,
.flash,
.tag,
.unmatched {
  border-radius: 16px;
  padding: 12px 14px;
}

.pill {
  background: rgba(29, 185, 84, 0.12);
}

.flash {
  margin-top: 18px;
  border: 1px solid transparent;
}

.flash-success {
  background: rgba(29, 185, 84, 0.12);
  border-color: rgba(29, 185, 84, 0.25);
}

.flash-error {
  background: rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.25);
}

.playlist-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.playlist-fields .full {
  grid-column: 1 / -1;
}

.track-list {
  display: grid;
  gap: 14px;
}

.track-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.track-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.track-top h3 {
  margin: 0 0 6px;
}

.track-top p,
.meta {
  margin: 0;
  color: var(--muted);
}

.tag {
  white-space: nowrap;
  height: fit-content;
  background: rgba(25, 33, 38, 0.08);
}

.pick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 14px;
}

.pick input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.unmatched {
  margin-top: 14px;
  background: rgba(255, 107, 53, 0.09);
  color: #7a3f27;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1080px);
    padding-top: 18px;
  }

  .hero,
  .panel {
    border-radius: 22px;
    padding: 20px;
  }

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

  .track-top {
    flex-direction: column;
  }
}
