:root {
  color-scheme: dark;
  --bg: #090a12;
  --panel: #11131f;
  --panel-raised: #181b29;
  --ink: #f3f0db;
  --muted: #9295a6;
  --line: #30344a;
  --accent: #a8ff60;
  --accent-2: #ffca5c;
  --shadow: #03040a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(168, 255, 96, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 255, 96, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #000 3px 4px);
}

.site-header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 56px);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--bg);
  background: var(--accent);
  box-shadow: 3px 3px 0 var(--shadow);
}

.system-status {
  color: var(--muted);
}

.system-status i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(36px, 7vw, 84px) clamp(20px, 4vw, 56px);
}

.shell > * {
  min-width: 0;
}

.intro,
.collections {
  grid-column: 1 / -1;
}

.intro {
  max-width: 1100px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.6rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.intro > p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.collection-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 8px;
}

.collection-button,
.pixel-button {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
}

.collection-button {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  justify-content: space-between;
  min-width: 170px;
  padding: 12px 14px;
  color: var(--muted);
  text-align: left;
}

.collection-button[aria-pressed="true"] {
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
}

.collection-count {
  opacity: 0.75;
}

.player-panel,
.catalog-panel,
.notes-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 6px 6px 0 var(--shadow);
}

.player-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.68fr) minmax(260px, 1fr);
  align-items: stretch;
}

.art-frame {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #0d0f18;
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.art-placeholder {
  display: grid;
  height: 100%;
  min-height: 330px;
  place-content: center;
  gap: 16px;
  color: var(--line);
  text-align: center;
  font-weight: 700;
}

.art-placeholder span:first-child {
  color: var(--accent);
  font-size: 5rem;
  text-shadow: 4px 4px 0 #203816;
}

.now-playing {
  display: flex;
  min-width: 0;
  padding: clamp(22px, 4vw, 44px);
  flex-direction: column;
  justify-content: center;
}

.now-playing h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.now-meta,
.player-status {
  color: var(--muted);
}

.now-meta {
  min-height: 1.2em;
  margin: 12px 0 28px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transport-button {
  width: 46px;
  height: 42px;
}

.play-button {
  width: 58px;
  height: 54px;
  color: var(--bg);
  border-color: var(--accent);
  background: var(--accent);
  font-size: 1.2rem;
}

.timeline {
  display: grid;
  grid-template-columns: 4ch 1fr 4ch;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.7rem;
}

input[type="range"] {
  width: 100%;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

.player-status {
  min-height: 1.3em;
  margin: 18px 0 0;
  font-size: 0.72rem;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.catalog-heading h2 {
  margin: 0;
  font-size: 1.25rem;
}

.track-count {
  color: var(--muted);
  font-size: 0.72rem;
}

.track-list {
  max-height: 510px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.track-item + .track-item {
  border-top: 1px solid var(--line);
}

.track-button {
  display: grid;
  width: 100%;
  grid-template-columns: 3ch minmax(0, 1fr) 5ch;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  color: var(--muted);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.track-button:hover,
.track-button[aria-current="true"] {
  color: var(--ink);
  background: var(--panel-raised);
}

.track-button[aria-current="true"] .track-number {
  color: var(--accent);
}

.track-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.track-title {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-subtitle,
.track-duration,
.track-number {
  font-size: 0.68rem;
}

.track-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notes-panel {
  padding: 24px;
}

.notes-panel #now-description {
  max-height: 380px;
  margin: 0 0 28px;
  overflow-y: auto;
  color: #c3c1b5;
  font-family: system-ui, sans-serif;
  line-height: 1.65;
  white-space: pre-wrap;
}

footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
}

noscript {
  display: block;
  padding: 20px;
  color: var(--accent-2);
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .intro,
  .collections {
    grid-column: 1;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-block: 18px;
  }

  .system-status {
    display: none;
  }

  .shell {
    padding-top: 42px;
  }

  .intro h1 {
    font-size: clamp(2.2rem, 11vw, 3.4rem);
  }

  .player-panel {
    grid-template-columns: 1fr;
  }

  .art-frame,
  .art-placeholder {
    min-height: min(76vw, 420px);
  }

  .art-frame {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
