:root {
  color-scheme: dark;
  --bg: #030303;
  --panel: #101010;
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f8f1e7;
  --muted: #a49c91;
  --dim: #756f67;
  --gold: #ffc857;
  --mint: #56dcc5;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 80% 8%, rgba(86, 220, 197, 0.08), transparent 360px),
    var(--bg);
  background-size: 48px 48px, 48px 48px, auto, auto;
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1380px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark,
.round-button,
.stamp-card__flag,
.record,
.mini-queue span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.38);
}

.brand__mark,
.round-button {
  width: 42px;
  height: 42px;
}

.brand strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.round-button {
  cursor: pointer;
}

.browse {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  min-height: calc(100vh - 78px);
  padding-top: 58px;
}

.browse__intro {
  padding-top: 98px;
}

.label {
  margin: 0 0 12px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 9ch;
  margin-bottom: 18px;
  font-size: clamp(58px, 7vw, 104px);
  line-height: 0.9;
  letter-spacing: 0;
}

.browse__intro p:not(.label) {
  max-width: 38ch;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.browse__actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.primary-action,
.secondary-action,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 18px;
  text-decoration: none;
}

.primary-action {
  border: 1px solid #ffe2a2;
  background: var(--gold);
  color: #171008;
  font-weight: 850;
  cursor: pointer;
}

.primary-action:disabled {
  border-color: var(--line);
  background: #151515;
  color: var(--dim);
  cursor: not-allowed;
}

.secondary-action,
.count-pill {
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
}

.count-pill {
  min-width: 92px;
  color: var(--muted);
}

.filters {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 250px);
  gap: 12px;
  margin-bottom: 16px;
}

.filters label {
  display: grid;
  gap: 6px;
}

.filters span {
  color: var(--dim);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #080808;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

.filters input:focus,
.filters select:focus {
  border-color: var(--gold);
}

.stamp-wall {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}

.stamp-card {
  position: relative;
  display: grid;
  min-height: 152px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
  cursor: pointer;
  padding: 14px;
  text-align: left;
  transform: rotate(var(--tilt));
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.stamp-card:hover,
.stamp-card[data-active="true"] {
  border-color: var(--gold);
  background: rgba(255, 200, 87, 0.07);
  transform: rotate(0deg) translateY(-2px);
}

.stamp-card__code {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.stamp-card__flag {
  width: 58px;
  height: 58px;
  align-self: center;
  justify-self: center;
  font-size: 32px;
}

.stamp-card__name {
  align-self: end;
  overflow: hidden;
  font-size: 16px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stamp-card__song {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player {
  min-height: 100vh;
  padding-top: 76px;
}

.record-panel {
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(360px, 0.92fr);
  gap: 34px;
  align-items: center;
}

.record-panel__deck {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 56% 45%, rgba(255, 200, 87, 0.08), transparent 36%),
    radial-gradient(circle at 88% 14%, rgba(86, 220, 197, 0.08), transparent 36%),
    rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.record {
  width: min(62vw, 460px);
  height: min(62vw, 460px);
  background:
    radial-gradient(circle, #080808 0 12%, transparent 12.5%),
    repeating-radial-gradient(circle, #101010 0 8px, #050505 9px 16px);
}

.record span {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background: #080808;
  font-size: 76px;
}

.needle {
  position: absolute;
  top: 115px;
  right: 86px;
  width: 250px;
  height: 3px;
  background: rgba(255, 255, 255, 0.62);
  transform: rotate(28deg);
  transform-origin: right;
}

.mini-queue {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  gap: 9px;
  width: min(210px, calc(100% - 56px));
}

.mini-queue button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  cursor: pointer;
  padding: 6px;
}

.mini-queue span {
  width: 34px;
  height: 34px;
  font-size: 19px;
}

.mini-queue b {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-panel__copy {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    #0a0a0a;
  padding: 28px;
}

.back-link {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.record-panel h2 {
  margin: 0 0 20px;
  font-size: clamp(48px, 6vw, 82px);
  line-height: 0.92;
  letter-spacing: 0;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.category-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  padding: 0 10px;
}

.category-tabs button[aria-selected="true"] {
  border-color: var(--gold);
  background: rgba(255, 200, 87, 0.1);
  color: var(--text);
}

.facts {
  display: grid;
  gap: 0;
  margin: 0 0 20px;
}

.facts div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.facts dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.facts dd {
  min-width: 0;
  margin: 0;
  font-weight: 720;
}

.song-note {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.inline-player {
  display: grid;
  min-height: 220px;
  margin-top: 20px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(86, 220, 197, 0.07), transparent 42%),
    #050505;
}

.inline-player iframe {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 0;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid #ffe2a2;
  border-radius: 999px;
  background: var(--gold);
  color: #171008;
  cursor: pointer;
  font-weight: 850;
  padding: 0 22px;
}

.play-button span {
  font-size: 13px;
}

.missing-player {
  display: grid;
  gap: 8px;
  max-width: 280px;
  color: var(--muted);
  text-align: center;
}

.missing-player b {
  color: var(--text);
}

.track-count {
  margin: 12px 0 0;
  color: var(--dim);
  font-size: 12px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-top: 28px;
  color: var(--dim);
  font-size: 12px;
}

.footer a {
  color: var(--muted);
}

@media (max-width: 980px) {
  .browse,
  .record-panel {
    grid-template-columns: 1fr;
  }

  .browse {
    padding-top: 52px;
  }

  .browse__intro {
    position: static;
  }

  .filters,
  .stamp-wall {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .app-shell {
    width: min(100% - 22px, 1380px);
    padding-top: 18px;
  }

  .topbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 68px;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .stamp-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stamp-card {
    min-height: 138px;
    padding: 12px;
  }

  .record-panel__deck {
    min-height: 460px;
  }

  .record {
    width: 310px;
    height: 310px;
  }

  .record span {
    width: 96px;
    height: 96px;
    font-size: 56px;
  }

  .needle {
    right: 34px;
    top: 70px;
    width: 170px;
  }

  .mini-queue {
    position: static;
    width: 100%;
    padding: 0 18px 18px;
  }

  .record-panel__copy {
    padding: 22px;
  }

  .category-tabs {
    grid-template-columns: 1fr;
  }
}
