:root {
  color-scheme: dark;
  --page-bg: #070707;
  --card-bg: #121212;
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --soft: rgba(255, 255, 255, 0.5);
  --spotify: #1db954;
  --spotify-dark: #072a14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(29, 185, 84, 0.16), transparent 34rem),
    var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.landing-page {
  display: grid;
  place-items: center;
  padding: 26px 16px;
}

body.index-page {
  padding: 32px 16px;
}

.card {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 24px 20px 28px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.brand-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  margin: 0 auto 14px;
  filter: invert(1);
  opacity: 0.92;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.blurb {
  margin: 0 auto 22px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.hero-image {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  margin: 0 0 22px;
  border-radius: 18px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.42);
}

.spotify-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--spotify);
  color: #000000;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.spotify-button:hover,
.spotify-button:focus-visible {
  background: #24d364;
  box-shadow: 0 0 0 5px rgba(29, 185, 84, 0.2);
  transform: translateY(-1px);
}

.spotify-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.spotify-button.is-opening {
  cursor: wait;
  opacity: 0.82;
}

.spotify-button img {
  width: 23px;
  height: 23px;
}

.note {
  margin: 13px 0 0;
  color: var(--soft);
  font-size: 12px;
}

.variant-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  text-align: left;
}

.variant-list a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.variant-list a:hover,
.variant-list a:focus-visible {
  border-color: rgba(29, 185, 84, 0.72);
}

.variant-list strong {
  display: block;
  margin-bottom: 4px;
}

.variant-list span {
  color: var(--muted);
  font-size: 14px;
}

.measurement-choice {
  margin: 7px 0 0;
  font-size: 9px;
  line-height: 1;
}

.measurement-choice a {
  color: rgba(255, 255, 255, 0.38);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.x-debug-panel {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 20;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 14px;
  background: rgba(245, 245, 245, 0.96);
  color: #111111;
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

.x-debug-panel h2,
.x-debug-panel h3,
.x-debug-panel p,
.x-debug-panel dl,
.x-debug-panel ol,
.x-debug-panel ul {
  margin: 0;
}

.x-debug-panel h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

.x-debug-panel h3 {
  font-size: 13px;
  margin-top: 12px;
  margin-bottom: 6px;
}

.x-debug-panel p {
  color: #444444;
  margin-bottom: 10px;
}

.debug-status {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.debug-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.debug-row dt {
  font-weight: 800;
}

.debug-row dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.debug-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.debug-actions button,
.debug-actions a {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.debug-log,
.debug-resources {
  padding-left: 18px;
}

.debug-log li,
.debug-resources li {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

@media (max-width: 380px) {
  .card {
    padding: 20px 16px 24px;
  }

  .brand-logo {
    width: 62px;
    height: 62px;
  }
}
