/* my weird music - stylesheet
   Base: ultraviolet night. Accents: a sticker sheet, one colour per genre.
   Motif: hard offset shadows in the genre colour, like stickers on a laptop. */

:root {
  --bg: #120f2d;
  --bg-2: #1b1646;
  --bg-3: #261f63;
  --ink: #f4efe6;
  --ink-2: rgba(244, 239, 230, 0.7);
  --ink-3: rgba(244, 239, 230, 0.45);
  --line: rgba(244, 239, 230, 0.16);

  --pink: #ff5ea8;
  --yellow: #ffd23f;
  --mint: #9ff5d2;
  --tangerine: #ff7a3d;
  --sky: #6cc8ff;
  --lilac: #c7a6ff;

  --accent: var(--pink);
  --glow: var(--pink);

  --display: "Dela Gothic One", "Arial Black", Impact, sans-serif;
  --body: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --topbar-h: 60px;
  --dock-h: 96px;
  --ease-pop: cubic-bezier(0.2, 0.9, 0.25, 1.25);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 140px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.45;
  font-variation-settings: "opsz" 14, "wdth" 100;
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-h) + 28px);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
kbd {
  font: 700 0.78em var(--body);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 2px 7px;
  margin: 0 6px 0 2px;
}

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

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

/* ---------- atmosphere ---------- */

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.glow span {
  position: absolute;
  width: 62vmax;
  height: 62vmax;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(110px);
  opacity: 0.22;
  transition: background 1.4s ease;
  animation: drift-a 26s ease-in-out infinite alternate;
  animation-play-state: paused;
}
.glow-a { top: -24vmax; left: -18vmax; }
.glow-b {
  bottom: -28vmax;
  right: -18vmax;
  opacity: 0.16;
  animation-name: drift-b;
}
body.playing .glow span { animation-play-state: running; opacity: 0.3; }
body.playing .glow-b { opacity: 0.22; }

@keyframes drift-a {
  to { transform: translate(14vmax, 10vmax) scale(1.15); }
}
@keyframes drift-b {
  to { transform: translate(-12vmax, -14vmax) scale(1.2); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%270.9%27 numOctaves=%273%27 stitchTiles=%27stitch%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23n)%27/%3E%3C/svg%3E");
}

main, .topbar, .foot { position: relative; z-index: 2; }

/* ---------- buttons ---------- */

.btn {
  --shadow: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 9px 14px; font-size: 0.9rem; box-shadow: 4px 4px 0 var(--shadow); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 var(--pink);
}
.topbar-nav { display: flex; gap: 18px; margin-left: auto; }
.topbar-nav a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.topbar-nav a:hover { color: var(--ink); border-bottom-color: var(--pink); }
.topbar .btn { --shadow: var(--yellow); }
@media (max-width: 640px) {
  .topbar-nav { display: none; }
  .topbar .btn { margin-left: auto; }
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(40px, 9vh, 96px) var(--gutter) 0;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 13.2vw, 11.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  max-width: 11ch;
  cursor: default;
  user-select: none;
}
.wordmark .w { display: inline-block; white-space: nowrap; margin-right: 0.22em; }
.wordmark .l {
  display: inline-block;
  transform: translateY(calc(sin(var(--i) * 1.1) * 0.07em)) rotate(calc(sin(var(--i) * 0.9) * 2.4deg));
  text-shadow: 0.05em 0.05em 0 var(--c);
}
.wordmark .l > i {
  display: inline-block;
  font-style: normal;
  animation: drop 0.8s var(--ease-pop) both;
  animation-delay: calc(var(--i) * 48ms + 80ms);
}
.wordmark:hover .l > i {
  animation: jiggle 0.55s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -70ms);
}
@keyframes drop {
  from { transform: translateY(-0.5em) rotate(-8deg); opacity: 0; }
}
@keyframes jiggle {
  from { transform: translateY(-0.04em) rotate(-2deg); }
  to { transform: translateY(0.04em) rotate(2deg); }
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: clamp(24px, 4vw, 40px);
}
.hero-sub {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.4;
  color: var(--ink-2);
  font-variation-settings: "opsz" 20, "wdth" 100;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions .btn-primary { --shadow: var(--pink); }
.hero-actions .btn:not(.btn-primary) { --shadow: var(--sky); }

/* the river: album covers on a 3D ribbon that never stops */

.river {
  margin: clamp(36px, 6vw, 64px) calc(-1 * var(--gutter)) 0;
  padding: 40px 0 46px;
  overflow: hidden;
  perspective: 900px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.river-track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding-left: 22px;
  transform-style: preserve-3d;
  animation: river var(--river-dur, 80s) linear infinite;
}
.river:hover .river-track,
.river:focus-within .river-track { animation-play-state: paused; }
@keyframes river { to { transform: translateX(-50%); } }

.river-item {
  --c: var(--accent);
  flex: 0 0 auto;
  width: clamp(104px, 12.5vw, 156px);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
  box-shadow: 7px 7px 0 var(--c);
  transform:
    translateY(calc(sin(var(--i) * 0.8) * 24px))
    rotateY(calc(sin(var(--i) * 0.8 + 1.2) * 20deg))
    rotate(calc(sin(var(--i) * 0.8) * 4deg));
  transition: transform 0.35s var(--ease-pop), box-shadow 0.2s;
}
.river-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.river-item:hover { transform: translateY(-8px) scale(1.08); z-index: 2; }
.river-item.is-current { box-shadow: 0 0 0 4px var(--ink), 7px 7px 0 var(--c); }
.river-item .fallback { font-size: 1.6rem; }

/* ---------- controls ---------- */

.controls {
  position: sticky;
  top: var(--topbar-h);
  z-index: 8;
  padding: 12px var(--gutter) 10px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  margin: 0 -2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.pills::-webkit-scrollbar { display: none; }
.pill {
  --c: var(--ink);
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
}
.pill small {
  font-size: 0.75em;
  font-weight: 600;
  opacity: 0.7;
}
.pill:hover { border-color: var(--c); color: var(--ink); }
.pill[aria-pressed="true"] {
  background: var(--c);
  border-color: var(--c);
  color: var(--bg);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.pill[aria-pressed="true"] small { opacity: 0.8; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.search {
  flex: 1 1 160px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
}
.search:focus-within { border-color: var(--ink); }
.search svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1rem;
}
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { filter: invert(1); }

.weird-range {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.weird-range input {
  width: 150px;
  accent-color: var(--pink);
}
.weird-range output {
  min-width: 5ch;
  color: var(--pink);
  font-weight: 800;
}
.sort select {
  height: 44px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg-2);
  font-weight: 600;
  cursor: pointer;
}
.count {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--ink-3);
}

@media (max-width: 960px) {
  .controls { padding: 8px var(--gutter) 10px; }
  .pills { padding: 4px 2px 8px; }
  .count { display: none; }
}
@media (max-width: 640px) {
  .controls-row { gap: 8px 12px; }
  .weird-range input { width: 110px; }
  .sort { display: none; }
}

/* ---------- the grid ---------- */

.grid-wrap {
  padding: clamp(28px, 5vw, 64px) var(--gutter) 40px;
  min-height: 50vh;
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 0 clamp(16px, 2.6vw, 34px);
  align-items: start;
}
.col {
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 4.5vw, 60px);
  transform: translateY(var(--y, 0px));
  will-change: transform;
}
.col:nth-child(even) { padding-top: var(--stagger, 64px); }
@media (max-width: 640px) {
  .col:nth-child(even) { --stagger: 36px; }
}

.tile {
  --c: var(--accent);
  position: relative;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.3s var(--ease-pop);
}
.tile:hover,
.tile:focus-within,
.tile.is-open { transform: rotate(0deg) translateY(-4px); z-index: 3; }

.sleeve { position: relative; }

.cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  position: relative;
  box-shadow: 9px 9px 0 var(--c);
  transition: box-shadow 0.2s;
}
.tile:hover .cover { box-shadow: 12px 12px 0 var(--c); }
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.3s;
}
.tile:hover .cover img { transform: scale(1.04); }
.tile.is-current .cover img { filter: saturate(1.15); }

.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 2.4rem;
  color: var(--bg);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 50%),
    var(--c);
}

.play-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px 0 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.play-badge svg { width: 14px; height: 14px; display: block; }
.tile:hover .play-badge,
.tile:focus-within .play-badge,
.tile.is-current .play-badge { opacity: 1; transform: none; }
@media (hover: none) { .play-badge { opacity: 1; transform: none; } }
.play-badge .eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.play-badge .eq i {
  width: 3px;
  height: 100%;
  background: var(--bg);
  border-radius: 2px;
  transform-origin: bottom;
  animation: eq 0.9s ease-in-out infinite;
}
.play-badge .eq i:nth-child(2) { animation-delay: -0.3s; }
.play-badge .eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}
.tile.is-current.is-playing .play-badge .ico { display: none; }
.tile.is-current.is-playing .play-badge .eq { display: inline-flex; }

.sticker {
  position: absolute;
  z-index: 4;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2px solid var(--bg);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.sticker-weird {
  top: -13px;
  right: -9px;
  background: var(--c);
  color: var(--bg);
  transform: rotate(6deg);
}
.sticker-new {
  top: -13px;
  left: -9px;
  background: var(--yellow);
  color: var(--bg);
  transform: rotate(-7deg);
}

.meta { padding: 18px 2px 0; }
.title {
  margin: 0;
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.15;
  font-variation-settings: "opsz" 24, "wdth" 92;
  overflow-wrap: anywhere;
}
.artist {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.artist .year { color: var(--ink-3); margin-left: 8px; font-weight: 500; }

.genre-btn {
  margin-top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px 5px 12px;
  border-radius: 999px;
  border: 2px solid var(--c);
  background: transparent;
  color: var(--c);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.genre-btn .q {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--c);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 900;
}
.genre-btn:hover,
.genre-btn[aria-expanded="true"] { background: var(--c); color: var(--bg); }
.genre-btn[aria-expanded="true"] .q { background: var(--bg); color: var(--c); }

.links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.plat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.plat svg { width: 15px; height: 15px; flex: none; }
.plat:hover { border-color: var(--ink); background: var(--bg-3); transform: translateY(-1px); }
@media (max-width: 480px) {
  .plat span { display: none; }
  .plat { padding: 9px; }
  .plat svg { width: 17px; height: 17px; }
}

/* what-is-this panel, over the cover */

.info {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 12px;
  border: 2px solid var(--c);
  background: color-mix(in srgb, var(--bg) 94%, var(--c));
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.4;
  animation: pop-in 0.25s var(--ease-pop);
  transform-origin: 20% 90%;
}
.info[hidden] { display: none; }
@keyframes pop-in {
  from { transform: scale(0.92); opacity: 0; }
}
.info h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--c);
}
.info p { margin: 0; }
.info .why { color: var(--ink); }
.info .what { color: var(--ink-2); }
.info-actions { margin-top: auto; display: flex; gap: 8px; align-items: center; padding-top: 6px; }
.info-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}
.info-play svg { width: 13px; height: 13px; }
.info-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}
.info-close:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .info { padding: 12px; font-size: 0.8rem; gap: 8px; }
}

.tile.spot .cover { animation: spot 1s ease; }
@keyframes spot {
  0% { box-shadow: 0 0 0 0 var(--ink), 9px 9px 0 var(--c); }
  40% { box-shadow: 0 0 0 10px var(--ink), 9px 9px 0 var(--c); }
  100% { box-shadow: 0 0 0 0 transparent, 9px 9px 0 var(--c); }
}

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--ink-2);
  font-size: 1.1rem;
}
.empty[hidden] { display: none; }
.empty p { margin: 0 0 18px; }
.empty .btn { --shadow: var(--mint); }

/* ---------- newsletter ---------- */

.newsletter { padding: 20px var(--gutter) 90px; }
.newsletter-card {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 52px);
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--bg-2);
  box-shadow: 12px 12px 0 var(--yellow);
  transform: rotate(-0.6deg);
}
.newsletter h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  line-height: 1;
  text-transform: lowercase;
  text-shadow: 0.06em 0.06em 0 var(--pink);
}
.newsletter p { margin: 0 0 22px; color: var(--ink-2); max-width: 52ch; }
.newsletter form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.newsletter .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.email-field { flex: 1 1 260px; display: flex; }
.email-field input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  font-size: 1rem;
  outline: 0;
}
.email-field input:focus { box-shadow: 0 0 0 3px var(--yellow); }
.email-field input::placeholder { color: var(--ink-3); }
.newsletter .btn-primary { --shadow: var(--mint); height: 50px; }
.form-msg {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-weight: 650;
  color: var(--mint);
}
.form-msg.is-error { color: var(--tangerine); }
.newsletter-card.is-done form { display: none; }
.newsletter-card.is-done .form-msg {
  font-size: 1.15rem;
  color: var(--ink);
}

/* ---------- footer ---------- */

.foot {
  padding: 0 var(--gutter) 40px;
  color: var(--ink-3);
  font-size: 0.86rem;
  max-width: 72ch;
}
.foot p { margin: 0 0 10px; }
.keys { line-height: 2.1; }
@media (hover: none) { .keys { display: none; } }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-h) + 30px);
  transform: translateX(-50%);
  z-index: 30;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 4px 4px 0 var(--ink);
  max-width: calc(100% - 32px);
  text-align: center;
  animation: pop-in 0.25s var(--ease-pop);
}
.toast[hidden] { display: none; }

/* ---------- dock ---------- */

.dock {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(820px, calc(100% - 20px));
  z-index: 20;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  grid-template-areas:
    "art meta ctl side"
    "bar bar bar bar";
  gap: 8px 14px;
  align-items: center;
  padding: 10px 14px 12px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 8px 8px 0 var(--glow);
  transition: box-shadow 1s ease;
  animation: dock-in 0.45s var(--ease-pop);
}
.dock[hidden] { display: none; }
@keyframes dock-in {
  from { transform: translate(-50%, 120%); }
}
.dock-art {
  grid-area: art;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-2);
  border: 2px solid var(--bg);
}
.dock-meta { grid-area: meta; min-width: 0; }
.dock-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variation-settings: "opsz" 20, "wdth" 92;
}
.dock-artist {
  font-size: 0.85rem;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-controls { grid-area: ctl; display: flex; gap: 6px; align-items: center; }
.dock-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: transparent;
  color: var(--bg);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.12s;
}
.dock-controls button svg { width: 18px; height: 18px; }
.dock-controls button:hover { transform: scale(1.08); }
.dock-controls button:active { transform: scale(0.94); }
#toggle { width: 48px; height: 48px; background: var(--bg); color: var(--ink); }
#toggle svg { width: 22px; height: 22px; }
#toggle .ico-pause { display: none; }
.dock.is-playing #toggle .ico-pause { display: block; }
.dock.is-playing #toggle .ico-play { display: none; }

.dock-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.dock-radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.dock-radio input { accent-color: var(--pink); width: 15px; height: 15px; margin: 0; }
.dock-side a { color: var(--bg); opacity: 0.75; }
.dock-side a:hover { opacity: 1; }

.dock-progress {
  grid-area: bar;
  height: 8px;
  border-radius: 999px;
  background: rgba(18, 15, 45, 0.16);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dock-progress:focus-visible { outline-offset: 4px; }
.dock-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--bg);
  transition: width 0.25s linear;
}

@media (max-width: 640px) {
  .dock {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "art meta ctl"
      "bar bar bar";
    gap: 8px 10px;
    padding: 10px 12px;
  }
  .dock-art { width: 48px; height: 48px; }
  .dock-side { display: none; }
  .dock-controls button { width: 34px; height: 34px; }
  #toggle { width: 42px; height: 42px; }
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .river-track { animation: none; }
  .river { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .river-item { transform: none; }
  .wordmark .l > i, .wordmark:hover .l > i { animation: none; }
  .glow span { animation: none !important; }
  .col { transform: none !important; }
  .tile { transform: none; }
  .dock { animation: none; }
  .info, .toast { animation: none; }
}
