/* Benj's Retrowave Player */
@font-face { font-family: "DM Sans"; src: url("../fonts/DMSans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --sky: linear-gradient(180deg, #b3a5ea 0%, #cfa8e2 28%, #f0b0cf 55%, #ffc6ad 80%, #ffdcab 100%);
  --card: #fff8f0;
  --card2: #fdeee4;
  --text: #2f2754;
  --muted: #62588f;
  --line: #463a78;
  --drop: #8d7fd0;
  --accent: #ff8fb3;
  --accent-ink: #3a2a5c;
  --mint: #8fd8cf;
  --sun: #ffd98c;
  --row-hover: #fbe3ea;
  --row-now: #ffd7e4;
  --track: #e8dcf0;
  --focus: #2c7be5;
  --title-shadow: #fff3e0;
  --title-drop: #8d7fd0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: linear-gradient(180deg, #15122c 0%, #221a45 35%, #3b2459 65%, #5b2f5f 88%, #7a3d5c 100%);
    --card: #241f42;
    --card2: #2d2750;
    --text: #f4eefe;
    --muted: #bdb1e6;
    --line: #8f81e0;
    --drop: #0c0a1d;
    --accent: #ff8fb3;
    --accent-ink: #2a1838;
    --mint: #6fc7bd;
    --sun: #ffd98c;
    --row-hover: #322b5a;
    --row-now: #4a2f5e;
    --track: #3b3466;
    --focus: #7fb4ff;
    --title-shadow: #2a1f4e;
    --title-drop: #ff8fb3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --sky: linear-gradient(180deg, #15122c 0%, #221a45 35%, #3b2459 65%, #5b2f5f 88%, #7a3d5c 100%);
  --card: #241f42; --card2: #2d2750; --text: #f4eefe; --muted: #bdb1e6; --line: #8f81e0; --drop: #0c0a1d;
  --accent: #ff8fb3; --accent-ink: #2a1838; --mint: #6fc7bd; --sun: #ffd98c; --row-hover: #322b5a; --row-now: #4a2f5e;
  --track: #3b3466; --focus: #7fb4ff; --title-shadow: #2a1f4e; --title-drop: #ff8fb3; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #c9a9dc;
  overflow-x: hidden;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body { background: #221a45; } }
:root[data-theme="dark"] body { background: #221a45; }
/* the sky stays put behind the page (background-attachment: fixed is unreliable on phones) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--sky);
}
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 24px 16px 40px; }

/* ---------- header */
.top { text-align: center; margin: 8px 0 26px; }
h1 {
  margin: 0;
  font-size: clamp(30px, 6.2vw, 50px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 2px 2px 0 var(--title-shadow), 4px 4px 0 var(--title-drop);
}
.sub { margin: 12px auto 0; max-width: 40em; color: var(--text); font-size: 16px; }

/* ---------- pixel boxes: square notched corners and a hard drop shadow */
.box {
  position: relative;
  background: var(--card);
  margin: 4px;
  padding: 20px;
  box-shadow:
    0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line),
    8px 8px 0 0 var(--drop), 4px 12px 0 0 var(--drop), 12px 4px 0 0 var(--drop);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
@media (min-width: 860px) {
  .grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
}

/* ---------- now playing */
.art {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto 18px;
  box-shadow: 0 0 0 4px var(--line);
  background: #a497e0;
}
.art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  display: block;
}
.reel-b { opacity: 0; }
.is-playing .reel-b { animation: reel 0.36s steps(1, end) infinite; }
@keyframes reel { 0% { opacity: 0; } 50% { opacity: 1; } }

.info { text-align: center; }
.kicker { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.info h2 { margin: 2px 0 2px; font-size: clamp(24px, 4.5vw, 30px); line-height: 1.15; font-weight: 800; }
.meta { margin: 0; color: var(--muted); font-size: 15px; }

/* seek bar */
.seek {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
}
.time { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--muted); min-width: 3.2em; }
.time:last-child { text-align: right; }

/* range inputs: a square, pixel-style thumb on a flat bar */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  --pct: 0%;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(90deg, var(--accent) var(--pct), var(--track) var(--pct));
  box-shadow: 0 0 0 2px var(--line);
}
input[type="range"]::-moz-range-track { height: 8px; background: var(--track); box-shadow: 0 0 0 2px var(--line); }
input[type="range"]::-moz-range-progress { height: 8px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 22px;
  margin-top: -7px;
  background: var(--sun);
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 3px var(--line), 3px 3px 0 3px var(--drop);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 22px;
  background: var(--sun);
  border: 0;
  border-radius: 0;
  box-shadow: 0 0 0 3px var(--line), 3px 3px 0 3px var(--drop);
}
input[type="range"]:focus-visible { outline-offset: 2px; }

/* buttons */
.btn {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  color: var(--accent-ink);
  background: var(--card2);
  border: 0;
  border-radius: 0;
  min-width: 52px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow:
    0 -3px 0 0 var(--line), 0 3px 0 0 var(--line), -3px 0 0 0 var(--line), 3px 0 0 0 var(--line),
    4px 6px 0 0 var(--drop), 6px 4px 0 0 var(--drop);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn { color: var(--text); }
.btn:hover { background: var(--row-hover); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 -3px 0 0 var(--line), 0 3px 0 0 var(--line), -3px 0 0 0 var(--line), 3px 0 0 0 var(--line); }
.btn[aria-disabled="true"] { opacity: 0.4; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }
.ico { width: 24px; height: 24px; fill: currentColor; shape-rendering: crispEdges; display: block; }

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  margin: 14px 0 6px;
}
.play { min-width: 72px; min-height: 64px; background: var(--accent); color: var(--accent-ink); }
.play:hover { background: var(--accent); filter: brightness(1.05); }
.play .ico { width: 32px; height: 32px; }
.play .i-pause { display: none; }
.is-playing .play .i-play { display: none; }
.is-playing .play .i-pause { display: block; }

.controls2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 18px;
  margin: 22px 0 4px;
  padding: 0 3px;
}
.pill { min-height: 48px; padding: 0 16px 0 12px; font-size: 15px; font-weight: 700; white-space: nowrap; }
#b-repeat .one { display: none; }
#b-repeat[data-mode="off"] .ico { opacity: 0.45; }
#b-repeat[data-mode="off"] { color: var(--muted); }
#b-repeat[data-mode="all"], #b-repeat[data-mode="one"] { background: var(--mint); color: var(--accent-ink); }
#b-repeat[data-mode="one"] .one { display: inline; }
.vol { display: flex; align-items: center; gap: 14px; flex: 1 1 150px; max-width: 240px; margin-left: auto; }
.vol input { flex: 1 1 auto; min-width: 90px; }
.icon { min-width: 48px; min-height: 48px; }
#b-mute .x { display: none; }
#b-mute[aria-pressed="true"] .x { display: inline; }
#b-mute[aria-pressed="true"] .waves { display: none; }
.no-volume .vol input { display: none; }
.no-volume .vol { flex: 0 0 auto; }

.about-track { margin-top: 22px; padding-top: 16px; border-top: 3px dotted var(--drop); }
.about-track p { margin: 0 0 10px; }
blockquote {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--card2);
  border-left: 4px solid var(--accent);
}
blockquote p { margin: 0 0 4px; }
blockquote footer { font-size: 14px; color: var(--muted); }
blockquote footer::before { content: "\2014\00a0"; }
.dl-now { margin-top: 14px; }
.dl-now a { font-weight: 700; }

/* ---------- the list */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.list-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.list-head p { margin: 0; color: var(--muted); font-size: 14px; }
#tracks { list-style: none; margin: 0; padding: 0; }
#tracks li { display: flex; align-items: stretch; }
#tracks li + li { border-top: 2px dashed var(--track); }
.row {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  min-height: 56px;
  font: inherit;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.row:hover { background: var(--row-hover); }
.row[aria-current="true"] { background: var(--row-now); box-shadow: inset 4px 0 0 var(--accent); }
.num { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 700; text-align: center; font-size: 14px; position: relative; }
.ttl { min-width: 0; }
.ttl b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.ttl small { display: block; color: var(--muted); font-size: 13px; line-height: 1.3; }
.dur { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.dl {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 10px;
  min-width: 48px;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
/* the little level meter on the current track */
.bars { display: none; height: 14px; width: 16px; margin: 0 auto; align-items: flex-end; justify-content: space-between; }
.bars i { display: block; width: 4px; background: var(--accent); height: 6px; }
.row[aria-current="true"] .n { display: none; }
.row[aria-current="true"] .bars { display: flex; }
.is-playing .row[aria-current="true"] .bars i { animation: bar 0.9s steps(3, end) infinite; }
.is-playing .row[aria-current="true"] .bars i:nth-child(2) { animation-delay: -0.3s; }
.is-playing .row[aria-current="true"] .bars i:nth-child(3) { animation-delay: -0.6s; }
@keyframes bar { 0% { height: 4px; } 33% { height: 14px; } 66% { height: 8px; } 100% { height: 4px; } }

.keys { margin-top: 16px; font-size: 14px; color: var(--muted); }
.keys summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.keys ul { margin: 6px 0 0; padding-left: 18px; }
kbd {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0 5px;
  background: var(--card2);
  box-shadow: 0 0 0 2px var(--line);
  color: var(--text);
}

/* ---------- credits */
.credits { margin-top: 36px; }
.credits h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.credits p { margin: 0 0 10px; max-width: 72em; }
.credits .small { font-size: 14px; color: var(--muted); margin: 0; }
.credits .nw { white-space: nowrap; }   /* (lines break between the credits, after the dots) */

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

@media (max-width: 520px) {
  .wrap { padding-top: 16px; }
  .top { margin-bottom: 20px; }
  .box { padding: 16px 14px; }
  .art { width: min(100%, 240px); }
  .controls { gap: 18px; }
  .controls2 { margin-top: 18px; }
  .vol { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .is-playing .reel-b, .is-playing .row[aria-current="true"] .bars i { animation: none; }
}

/* (2026-11-21: no track descriptions; the box shows only when a download link is on) */
.about-track:not(:has(.dl-now:not([hidden]))) { display: none; }
