/* Zero Samples: a synthwave night. Dark-only page. */
:root {
  color-scheme: dark;
  --bg: #0a0620;
  --ink: #f6f0ff;
  --ink2: #cfc3ea;
  --ink3: #a597cf;
  --panel: rgba(26, 12, 58, .74);
  --edge: rgba(255, 79, 216, .42);
  --edge-soft: rgba(255, 79, 216, .2);
  --rule: rgba(207, 195, 234, .13);
  --field: rgba(10, 5, 28, .55);
  --field-edge: rgba(207, 195, 234, .22);
  --magenta: #ff4fd8;
  --yellow: #ffd23f;
  --cyan: #3ee6ff;
  --cyan-ink: #aef4ff;
  --focus: #7df3ff;
  --sunset: linear-gradient(90deg, #4a1a8f 0%, #a0249c 24%, #ff3d9a 52%, #ff8a3d 78%, #ffd23f 100%);
  --hot: linear-gradient(100deg, #ff3d9a 0%, #ff5f7a 45%, #ff9a3c 100%);
  --display: 'Orbitron', 'Eurostile', 'Michroma', 'Arial Black', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --gutter: 40px;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5;
  background: radial-gradient(90% 60% at 50% 100%, rgba(120, 30, 140, .22), transparent 70%), var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.k { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .26em; color: var(--ink3); margin: 0; text-transform: uppercase; }

/* ---------- scanlines (decorative) ---------- */
.scan { position: fixed; inset: 0; z-index: 30; pointer-events: none; background: repeating-linear-gradient(180deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 3px); }

/* ---------- hero: sky, stars, sun, horizon, grid floor ---------- */
.hero { position: relative; z-index: 0; background: linear-gradient(180deg, #05021a 0%, #0c0630 30%, #1b0a45 58%, #3a0e5e 82%, #6c1573 100%); }
.hero::after { /* the horizon line */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; z-index: 1;
  background: linear-gradient(90deg, rgba(255, 79, 216, 0), #ff6ad5 18%, #ffd3f4 50%, #ff6ad5 82%, rgba(255, 79, 216, 0));
  box-shadow: 0 0 14px 1px rgba(255, 79, 216, .7), 0 0 44px 6px rgba(255, 61, 154, .35);
}
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; --sun: 340px; --sun-x: calc(50% + 350px); }
.stars {
  position: absolute; inset: 0; opacity: .75;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='300'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='14' cy='22' r='1'/%3E%3Ccircle cx='96' cy='70' r='.7' opacity='.6'/%3E%3Ccircle cx='171' cy='18' r='.8' opacity='.8'/%3E%3Ccircle cx='230' cy='122' r='.6' opacity='.5'/%3E%3Ccircle cx='302' cy='46' r='1.1'/%3E%3Ccircle cx='366' cy='160' r='.7' opacity='.6'/%3E%3Ccircle cx='48' cy='188' r='.8' opacity='.7'/%3E%3Ccircle cx='140' cy='240' r='.6' opacity='.5'/%3E%3Ccircle cx='258' cy='214' r='.9' opacity='.8'/%3E%3Ccircle cx='398' cy='262' r='.6' opacity='.5'/%3E%3Ccircle cx='330' cy='102' r='.5' opacity='.5'/%3E%3Ccircle cx='70' cy='122' r='.5' opacity='.45'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='290' height='230'%3E%3Cg fill='%23e8dcff'%3E%3Ccircle cx='40' cy='60' r='.6' opacity='.55'/%3E%3Ccircle cx='190' cy='30' r='.7' opacity='.6'/%3E%3Ccircle cx='250' cy='150' r='.5' opacity='.5'/%3E%3Ccircle cx='120' cy='170' r='.8' opacity='.7'/%3E%3Ccircle cx='20' cy='210' r='.5' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  background-position: 0 0, 137px 71px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 88%); mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 88%);
}
.glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(calc(var(--sun) * .95) calc(var(--sun) * .62) at var(--sun-x) 100%, rgba(255, 138, 61, .42), rgba(255, 61, 154, .16) 55%, transparent 100%),
    radial-gradient(75% 55% at 50% 100%, rgba(255, 61, 154, .36), rgba(160, 36, 156, .12) 55%, transparent 100%);
}
.sun {
  position: absolute; bottom: 0; left: calc(var(--sun-x) - var(--sun) / 2); width: var(--sun); height: var(--sun);
  transform: translateY(42%); border-radius: 50%;
  background: linear-gradient(180deg, #ffe66e 4%, #ffb347 19%, #ff7a45 33%, #ff3d9a 47%, #d81fc4 58%);
  -webkit-mask-image: linear-gradient(180deg, #000 33%, transparent 33% 34.2%, #000 34.2% 38%, transparent 38% 39.6%, #000 39.6% 43%, transparent 43% 45%, #000 45% 48%, transparent 48% 50.6%, #000 50.6% 53.2%, transparent 53.2% 56.2%, #000 56.2%);
          mask-image: linear-gradient(180deg, #000 33%, transparent 33% 34.2%, #000 34.2% 38%, transparent 38% 39.6%, #000 39.6% 43%, transparent 43% 45%, #000 45% 48%, transparent 48% 50.6%, #000 50.6% 53.2%, transparent 53.2% 56.2%, #000 56.2%);
}
.floor {
  position: absolute; top: 100%; left: 0; right: 0; height: 600px; overflow: hidden; pointer-events: none;
  perspective: 340px; perspective-origin: 50% 36px;
  background: linear-gradient(180deg, #1c0838 0%, rgba(10, 6, 32, 0) 80%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 96%); mask-image: linear-gradient(180deg, #000 0%, #000 42%, transparent 96%);
}
.plane {
  position: absolute; left: -150%; right: -150%; bottom: -120px; height: 3600px; transform-origin: 50% 100%;
  background-image: linear-gradient(90deg, rgba(255, 79, 216, .62) 2px, transparent 2px), linear-gradient(180deg, rgba(255, 79, 216, .62) 2px, transparent 2px);
  background-size: 90px 90px; background-position: 50% 100%;
  transform: rotateX(84deg); animation: drive 2.4s linear infinite;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%); mask-image: linear-gradient(180deg, transparent 0%, #000 55%);
}
@keyframes drive { from { transform: rotateX(84deg) translateY(0); } to { transform: rotateX(84deg) translateY(90px); } }
.hero.still .plane { animation-play-state: paused; }

.hero-in { position: relative; z-index: 2; padding-top: 26px; padding-bottom: 76px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; margin-left: -10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--ink2);
  border-radius: 999px; border: 1px solid transparent; transition: border-color .15s ease, color .15s ease;
}
.back svg { width: 15px; height: 15px; }
.back:hover { color: var(--ink); border-color: var(--edge-soft); }
.meta { font-family: var(--mono); font-size: 13px; letter-spacing: .24em; color: var(--ink2); display: flex; flex-wrap: wrap; gap: 6px 34px; margin: 22px 0 0; }
.meta b { color: var(--yellow); font-weight: 500; }
h1 {
  font-family: var(--display); font-weight: 900; font-size: clamp(46px, 7.4vw, 96px); line-height: 1; letter-spacing: .03em;
  text-transform: uppercase; margin: 16px 0 24px -3px; max-width: 12em;
}
h1 .w1 { color: #fff3fd; text-shadow: 0 0 3px #ff9be8, 0 0 12px rgba(255, 79, 216, .95), 0 0 30px rgba(255, 61, 154, .6), 0 0 60px rgba(255, 61, 154, .3); }
h1 .w2 {
  background: linear-gradient(180deg, #ffffff 8%, #d5eeff 34%, #8fd3ff 49%, #6d4bff 51%, #ff58cf 55%, #ff9fe0 76%, #ffe8f7 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(62, 230, 255, .28)) drop-shadow(0 3px 0 rgba(22, 4, 44, .85));
}
.lede { font-size: 17.5px; line-height: 1.6; color: var(--ink2); max-width: 36em; margin: 0; }
.lede strong { color: var(--ink); font-weight: 700; }

/* ---------- panels ---------- */
.main { position: relative; z-index: 1; padding-top: 38px; padding-bottom: 40px; }
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--edge); border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 28px rgba(255, 79, 216, .14), 0 26px 60px rgba(3, 1, 12, .5);
  -webkit-backdrop-filter: blur(12px) saturate(1.15); backdrop-filter: blur(12px) saturate(1.15);
}
.panel + .panel { margin-top: 40px; }
.player { overflow: hidden; scroll-margin-top: 16px; }
.player:focus { outline: none; }
.player:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--magenta)); box-shadow: 0 0 8px var(--c-glow, rgba(255, 79, 216, .5)); flex: none; }

/* now playing */
.now { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 16px 22px 15px; border-bottom: 1px solid var(--rule); }
.now-info { min-width: 0; }
.now-title { font-family: var(--sans); font-weight: 700; font-size: 22px; line-height: 1.25; margin: 5px 0 3px; color: var(--ink); overflow-wrap: anywhere; }
.now-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--ink2); }
.genre { display: inline-flex; align-items: center; gap: 8px; color: var(--c-ink, var(--ink2)); }
.now-note { margin: 0 0 7px; font-size: 15px; font-style: italic; line-height: 1.45; color: var(--ink2); max-width: 46em; }
.now-note:empty, .now-from:empty, .now-album:empty { display: none; }
.now-from { font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.notice { margin: 0; padding: 10px 22px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink2); background: rgba(62, 230, 255, .06); }
.notice::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 10px 1px 0; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(62, 230, 255, .8); }
.now-act { display: flex; gap: 10px; flex: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent; background: none; font-weight: 700; font-size: 14.5px; letter-spacing: .01em;
  white-space: nowrap; transition: background-color .15s ease, border-color .15s ease, filter .15s ease, transform .12s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--hot); color: #1c0520; box-shadow: 0 0 20px rgba(255, 61, 154, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn.primary svg { width: 15px; height: 15px; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.07) saturate(1.05); }
.btn.ghost { border-color: rgba(62, 230, 255, .5); color: var(--cyan-ink); background: rgba(62, 230, 255, .04); }
.btn.ghost:hover:not(:disabled) { background: rgba(62, 230, 255, .12); border-color: rgba(62, 230, 255, .8); }
.btn:active:not(:disabled) { transform: scale(.97); }
.linkish { background: none; border: 0; padding: 8px 4px; min-height: 40px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--ink3); text-transform: uppercase; }
.linkish:hover { color: var(--ink); }

/* transport */
.top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 16px 22px 16px 20px; }
.play {
  font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: .1em;
  display: inline-flex; align-items: center; gap: 12px; height: 50px; min-width: 150px; justify-content: center; padding: 0 26px 0 22px;
  border: 0; border-radius: 999px; background: var(--hot); color: #1c0520;
  box-shadow: 0 0 24px rgba(255, 61, 154, .45), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .12s ease, filter .12s ease, box-shadow .2s ease;
}
.play svg { width: 16px; height: 16px; flex: none; }
.play:hover:not(:disabled) { filter: brightness(1.07); box-shadow: 0 0 32px rgba(255, 61, 154, .6), inset 0 1px 0 rgba(255, 255, 255, .4); }
.play:active:not(:disabled) { transform: scale(.97); }
.play:disabled { opacity: .45; cursor: progress; box-shadow: none; }
.prog { min-width: 0; }
.bar { height: 6px; border-radius: 3px; background: rgba(207, 195, 234, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--sunset); background-size: var(--full, 100%) 100%; box-shadow: 0 0 10px rgba(255, 61, 154, .6); }
.status { font-family: var(--mono); font-size: 13.5px; color: var(--ink2); margin-top: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status b { color: var(--ink); font-weight: 500; }
.vol { display: flex; align-items: center; gap: 14px; min-height: 40px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; color: var(--ink2); }
input[type=range] { -webkit-appearance: none; appearance: none; height: 40px; margin: 0; padding: 0; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--magenta) var(--p, 50%), rgba(207, 195, 234, .18) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--magenta) var(--p, 50%), rgba(207, 195, 234, .18) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--magenta); box-shadow: 0 0 10px rgba(255, 79, 216, .7); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--magenta); box-shadow: 0 0 10px rgba(255, 79, 216, .7); }
input[type=range]:focus-visible { outline-offset: 0; }
input[type=range]:disabled { cursor: default; }
input[type=range]:disabled::-webkit-slider-runnable-track { background: rgba(207, 195, 234, .14); }
input[type=range]:disabled::-moz-range-track { background: rgba(207, 195, 234, .14); }
input[type=range]:disabled::-webkit-slider-thumb { background: #5b4f7c; border-color: #7d70a3; box-shadow: none; }
input[type=range]:disabled::-moz-range-thumb { background: #5b4f7c; border-color: #7d70a3; box-shadow: none; }
.vol input { width: 112px; }

/* timeline: section labels over a slim, section-coloured scrubber */
.timeline { border-top: 1px solid var(--rule); padding: 12px 22px 2px; }
.labels { position: relative; height: 20px; }
.lab {
  position: absolute; top: 0; bottom: 0; padding: 2px 0 0 6px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--ink3);
  white-space: nowrap; overflow: hidden; text-overflow: clip; border: 0; background: none; text-align: left;
}
.lab::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 2px; width: 1px; background: rgba(207, 195, 234, .2); }
.lab:hover { color: var(--ink2); }
.lab.on { color: var(--c); }
.lab:focus-visible { outline-offset: -2px; }
.scrub { position: relative; height: 34px; cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; border-radius: 6px; }
.scrub:focus-visible { outline-offset: 0; }
.rail { position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 3px; overflow: hidden; background: rgba(207, 195, 234, .08); }
.segs { position: absolute; inset: 0; }
.segs i { position: absolute; top: 0; bottom: 0; background: var(--c); opacity: .32; border-right: 2px solid transparent; background-clip: padding-box; }
.segs i:last-child { border-right: 0; }
.segs.played { clip-path: inset(0 100% 0 0); }
.segs.played i { opacity: .95; }
.playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 0; pointer-events: none; will-change: transform; }
.playhead::before { content: ""; position: absolute; top: 5px; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: #f4fdff; box-shadow: 0 0 0 3px rgba(10, 6, 32, .85), 0 0 10px rgba(62, 230, 255, .75); }
.player[data-state="loading"] .playhead, .player[data-state="error"] .playhead { opacity: 0; }
/* until a track is ready, the timeline may still show the last one's sections: step it back */
.labels, .rail { transition: opacity .25s ease; }
.player[data-state="loading"] .labels, .player[data-state="loading"] .rail,
.player[data-state="error"] .labels, .player[data-state="error"] .rail { opacity: .45; }
.scrub:hover .rail { background: rgba(207, 195, 234, .12); }

/* readouts */
.bottom { display: grid; grid-template-columns: 30fr 38fr 32fr; border-top: 1px solid var(--rule); min-height: 118px; }
.cell { padding: 17px 20px 15px; min-width: 0; }
.cell + .cell { border-left: 1px solid var(--rule); }
/* .big names are shrunk to fit by app.js; the fixed line height keeps the cell from moving */
.big { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 28px; letter-spacing: .04em; margin: 9px 0 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time { font-family: var(--mono); font-size: 13px; line-height: 17px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.beats { display: flex; gap: 6px; margin-top: 11px; }
.beats span { width: 10px; height: 10px; border-radius: 2px; background: rgba(207, 195, 234, .14); }
.beats span.on { background: var(--magenta); box-shadow: 0 0 6px rgba(255, 79, 216, .6); }
.desc { font-size: 14.5px; color: var(--ink2); margin: 2px 0 0; }
.cell.fft { display: flex; flex-direction: column; }
.cell.fft canvas { display: block; width: 100%; height: 56px; margin-top: auto; }
.foot { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; border-top: 1px solid var(--rule); padding: 13px 20px; font-family: var(--mono); font-size: 12px; color: var(--ink3); }
.foot b { color: var(--ink2); font-weight: 500; }

/* ---------- album shelf ---------- */
.shelf { padding: 28px; }
.shelf-head h2 { font-family: var(--sans); font-weight: 700; font-size: 23px; line-height: 1.25; margin: 8px 0 6px; color: var(--ink); }
.shelf-head h2 span { font-weight: 400; font-style: italic; color: #ffb8ec; }
.shelf-sub { margin: 0; font-size: 15px; color: var(--ink2); text-wrap: pretty; }
.covers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.alb {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; min-width: 0; padding: 8px 8px 12px;
  border-radius: 14px; border: 1px solid transparent; background: none; text-align: left; transition: background-color .15s ease, border-color .15s ease;
}
.alb:hover { background: rgba(207, 195, 234, .05); }
.alb-art { position: relative; display: block; aspect-ratio: 1; margin-bottom: 9px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(207, 195, 234, .14), 0 14px 30px rgba(3, 1, 12, .5); transition: transform .2s ease, box-shadow .2s ease; }
.alb-art svg { display: block; width: 100%; height: 100%; }
.alb:hover .alb-art { transform: translateY(-2px); }
.alb[aria-selected="true"] { background: var(--c-soft); border-color: var(--c-glow); }
.alb[aria-selected="true"] .alb-art { box-shadow: 0 0 0 2px var(--c-ink), 0 0 22px var(--c-glow), 0 14px 30px rgba(3, 1, 12, .5); }
.alb-t { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.alb-m { display: flex; flex-direction: column; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; letter-spacing: .02em; color: var(--ink3); }
.alb-g { color: var(--c-ink); }
.alb-now { position: absolute; right: 8px; bottom: 8px; display: none; align-items: flex-end; gap: 2px; height: 22px; padding: 4px 6px; border-radius: 6px; background: rgba(10, 6, 32, .78); }
.alb-now i { width: 3px; height: 40%; border-radius: 1px; background: var(--c-ink); }
.alb.cur .alb-now { display: flex; }
.alb.cur.playing .alb-now i { animation: eq .9s ease-in-out infinite alternate; }
.alb-now i:nth-child(2) { height: 90%; animation-delay: -.3s; }
.alb-now i:nth-child(3) { height: 60%; animation-delay: -.6s; }

.album-panel { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--rule); }
.ap-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 16px; }
.ap-info { min-width: 0; }
.ap-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--c-ink, var(--ink2)); }
.album-panel h3 { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.15; letter-spacing: .03em; margin: 8px 0 8px; color: var(--ink); overflow-wrap: anywhere; }
.ap-blurb { margin: 0 0 8px; font-size: 16px; line-height: 1.55; color: var(--ink2); max-width: 44em; text-wrap: pretty; }
.ap-by { margin: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--ink3); }
.ap-head .btn { flex: none; }
.tracks { list-style: none; margin: 0; padding: 0; }
.tracks li + li { border-top: 1px solid var(--rule); }
.trk {
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 3.6em; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 9px 12px; border: 0; border-radius: 10px; background: none; text-align: left; position: relative;
  transition: background-color .15s ease;
}
.trk:hover { background: rgba(207, 195, 234, .06); }
.trk:focus-visible { outline-offset: -2px; } /* inside the row, so it never runs over its neighbours */
.trk-n { font-family: var(--mono); font-size: 13px; color: var(--ink3); display: flex; align-items: center; height: 16px; }
.trk-body { display: flex; flex-direction: column; min-width: 0; }
.trk-t { font-weight: 500; font-size: 16px; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.trk-note { font-size: 13.5px; line-height: 1.4; color: var(--ink3); margin-top: 2px; overflow-wrap: anywhere; text-wrap: pretty; }
.trk-note:empty { display: none; }
.trk-d { font-family: var(--mono); font-size: 13px; color: var(--ink2); text-align: right; font-variant-numeric: tabular-nums; }
.trk-d.busy { color: var(--cyan-ink); } /* loading or render progress, not a duration */
.trk[aria-current="true"] { background: linear-gradient(90deg, var(--c-soft, rgba(255, 79, 216, .16)), rgba(255, 79, 216, .02)); }
.trk[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--c-ink, var(--magenta)); box-shadow: 0 0 8px var(--c-glow, var(--magenta)); }
.trk[aria-current="true"] .trk-n { color: var(--c-ink, var(--magenta)); }
.eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--c-ink, var(--magenta)); border-radius: 1px; height: 40%; animation: eq .9s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.3s; height: 90%; }
.eq i:nth-child(3) { animation-delay: -.6s; height: 60%; }
@keyframes eq { from { height: 25%; } to { height: 100%; } }
.trk.playing .eq { display: flex; }
.trk.playing .trk-num { display: none; }

/* ---------- generator ---------- */
.maker { padding: 28px; }
.maker-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: 22px; }
.maker h2 { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; margin: 0; color: var(--ink); }
.maker-note { margin: 0; font-size: 15px; color: var(--ink2); max-width: 44em; }
.gen fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.gen legend { padding: 0; margin-bottom: 10px; }
.gen label.k { display: block; margin-bottom: 10px; }
.genre-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.face {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--field-edge); background: var(--field); color: var(--ink2); transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.choice:hover .face { border-color: rgba(207, 195, 234, .45); color: var(--ink); }
.choice input:focus-visible + .face { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice input:checked + .face { color: var(--ink); border-color: var(--c-ink, var(--magenta)); background: var(--c-soft, rgba(255, 79, 216, .14)); box-shadow: inset 0 0 0 1px var(--c-ink, var(--magenta)), 0 0 18px var(--c-glow, rgba(255, 79, 216, .3)); }
.choice input:disabled { cursor: not-allowed; }
.choice input:disabled + .face { opacity: .38; }
.gface { min-height: 58px; }
.gface .gname { font-weight: 700; font-size: 15px; line-height: 1.2; }
.gface .gbpm { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .04em; color: var(--ink3); margin-top: 2px; }
.blurb { margin: 12px 0 0; min-height: 1.5em; font-size: 15px; color: var(--ink2); }
.blurb b { color: var(--c-ink, var(--ink)); font-weight: 700; }
.opts { display: grid; grid-template-columns: 180px minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "key mood tempo" "len len energy"; gap: 22px 26px; margin-top: 26px; }
.opt-key { grid-area: key; } .opt-mood { grid-area: mood; } .opt-tempo { grid-area: tempo; } .opt-len { grid-area: len; } .opt-energy { grid-area: energy; }
.seg { display: flex; gap: 8px; }
.seg .choice { flex: 1 1 0; min-width: 0; }
.seg .face { justify-content: center; text-align: center; padding: 6px 8px; font-weight: 500; font-size: 14.5px; flex-direction: column; gap: 0; line-height: 1.2; }
.seg .face small { font-family: var(--mono); font-size: 11px; color: var(--ink3); font-weight: 400; letter-spacing: .02em; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: rotate(45deg); pointer-events: none; }
.select select {
  -webkit-appearance: none; appearance: none; width: 100%; min-height: 44px; padding: 0 38px 0 14px; border-radius: 10px;
  border: 1px solid var(--field-edge); background: var(--field); color: var(--ink); font-size: 15px; cursor: pointer;
}
.select select:hover { border-color: rgba(207, 195, 234, .45); }
.select select option { background: #1a0c3a; color: var(--ink); }
.tempo { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.tempo input[type=range] { flex: 1 1 auto; min-width: 0; height: 44px; }
.tempo output { font-family: var(--mono); font-size: 13px; color: var(--ink); min-width: 5.6em; text-align: right; white-space: nowrap; }
.tempo output.auto { color: var(--ink3); }
.check { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; position: relative; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; flex: none; }
.check input { position: absolute; z-index: 1; left: 0; top: 50%; width: 22px; height: 22px; margin: -11px 0 0; opacity: 0; cursor: pointer; }
.check .box { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(207, 195, 234, .5); background: var(--field); display: grid; place-items: center; }
.check .box::after { content: ""; width: 10px; height: 5px; border-left: 2px solid #1c0520; border-bottom: 2px solid #1c0520; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked + .box { background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 10px rgba(255, 79, 216, .5); }
.check input:checked + .box::after { opacity: 1; }
.check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.gen-act { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.big-btn { min-height: 48px; padding: 0 26px; font-size: 15.5px; }
.mine { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--rule); }
.mine-head { display: flex; align-items: center; justify-content: space-between; }
.mine-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mine-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; width: 100%; min-height: 52px; padding: 8px 14px;
  border-radius: 10px; border: 1px solid var(--field-edge); background: var(--field); text-align: left; transition: border-color .15s ease;
}
.mine-item:hover { border-color: rgba(207, 195, 234, .45); }
.mine-item[aria-current="true"] { border-color: var(--c-ink, var(--magenta)); box-shadow: inset 0 0 0 1px var(--c-ink, var(--magenta)); }
.mine-item .dot { grid-row: span 2; }
.mine-t { font-weight: 700; font-size: 14.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-g { font-family: var(--mono); font-size: 11.5px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- footer ---------- */
.site-foot { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-top: 0; padding-bottom: 36px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink3); }
.site-foot a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink2); text-decoration-color: rgba(207, 195, 234, .4); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--ink); }

/* ---------- narrower screens ---------- */
@media (max-width: 1000px) {
  .sky { --sun: 300px; --sun-x: calc(100% - 150px); }
  .hero-in { padding-bottom: 72px; }
  .lede { max-width: 30em; }
  .status { white-space: normal; line-height: 1.45; }
  .time .sep { display: none; }
  #secBar { display: block; }
  .covers { gap: 10px; }
  .alb { padding: 6px 6px 10px; }
  .alb-t { font-size: 14px; }
  .alb-m { font-size: 11px; }
  .genre-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .opts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "key tempo" "mood mood" "len energy"; }
}
@media (max-width: 900px) {
  :root { --gutter: 28px; }
  .sky { --sun: 240px; --sun-x: calc(100% - 130px); }
  .hero-in { padding-bottom: 96px; }
  .lede { font-size: 16.5px; max-width: 27em; }
  .bottom { grid-template-columns: 1fr 1fr; }
  .cell.fft { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); flex-direction: row; align-items: center; gap: 18px; padding-top: 12px; padding-bottom: 12px; }
  .cell.fft canvas { flex: 1 1 auto; min-width: 0; height: 44px; margin-top: 0; }
  .scrub { height: 40px; }
}
/* Five covers side by side get too small to read (and their facts wrap): from here down they are a row you
 * swipe or click through. The row scrolls, never the page. Covers are sized so that about 4.4 (3.4 on small
 * tablets, 2.3 on phones) fit across: the next one always peeks in by a good third, so the row visibly continues.
 * (Row width = viewport - gutters - borders; the constant also takes off the row's lead padding and the gaps.) */
@media (max-width: 800px) {
  .covers { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 28px; margin: 18px -28px 0; padding: 6px 28px 8px; scrollbar-width: none; }
  .covers::-webkit-scrollbar { display: none; }
  .alb { flex: 0 0 calc((100vw - 126px) / 4.4); scroll-snap-align: start; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .sky { --sun: 210px; --sun-x: 50%; }
  .hero-in { padding-top: 14px; padding-bottom: 146px; }
  /* two fixed rows, BPM and key / bars and samples (the break is the ::after), so a long key such as
   * B MIXOLYDIAN → E MAJOR never adds a line */
  .meta { display: flex; flex-wrap: wrap; gap: 2px 22px; font-size: 11.5px; letter-spacing: .16em; margin-top: 14px; }
  .meta::after { content: ""; flex-basis: 100%; order: 1; }
  .meta > span:nth-child(n+3) { order: 2; }
  h1 { margin: 12px 0 16px -2px; }
  .lede { font-size: 16px; }
  .main { padding-top: 34px; }
  .panel { border-radius: 16px; }
  .panel + .panel { margin-top: 28px; }
  .now { flex-direction: column; align-items: stretch; padding: 16px 14px 14px; }
  .now-title { font-size: 20px; }
  .now-act .btn { flex: 1 1 0; padding: 0 12px; }
  .top { grid-template-columns: auto 1fr; padding: 14px; gap: 12px 16px; }
  .status { font-size: 12.5px; line-height: 1.5; }
  .time { font-size: 12px; }
  .prog { grid-column: 1 / -1; grid-row: 2; }
  .vol { justify-self: end; }
  .vol input { width: 96px; }
  .notice { padding: 10px 14px; font-size: 13.5px; }
  .timeline { padding: 10px 14px 0; }
  .lab { font-size: 10px; letter-spacing: .02em; padding-left: 4px; }
  .bottom { grid-template-columns: 1fr 1fr; min-height: 0; }
  .cell { padding: 15px 14px 13px; }
  .big { font-size: 19px; line-height: 23px; }
  .desc { font-size: 13.5px; line-height: 1.45; }
  .cell.fft { display: none; } /* a phone keeps just the two readouts */
  .foot { padding: 11px 14px; font-size: 11px; }
  .shelf { padding: 20px 0 12px; }
  .shelf-head { padding: 0 16px; }
  .shelf-head h2 { font-size: 19px; }
  .shelf-sub { font-size: 14.5px; }
  .covers { scroll-padding: 0 16px; padding: 6px 16px 8px; margin: 10px 0 0; } /* the shelf has no side padding here */
  .alb { flex-basis: calc((100vw - 78px) / 3.4); }
  .album-panel { margin: 14px 12px 0; padding-top: 18px; }
  .ap-head { flex-direction: column; align-items: stretch; padding: 0 4px; margin-bottom: 10px; }
  .album-panel h3 { font-size: 21px; }
  .ap-blurb { font-size: 15px; }
  .ap-by { font-size: 11.5px; }
  .ap-head .btn { align-self: flex-start; }
  .trk { grid-template-columns: 2em minmax(0, 1fr) 3.2em; gap: 10px; padding: 9px 8px; }
  .trk-t { font-size: 15px; }
  .trk-note { font-size: 13px; }
  .trk-d { font-size: 12px; }
  .maker { padding: 20px 14px; }
  .maker h2 { font-size: 18px; }
  .maker-note { font-size: 14.5px; }
  .genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gface { min-height: 54px; padding: 8px 10px; }
  .opts { grid-template-columns: minmax(0, 1fr); grid-template-areas: "key" "mood" "tempo" "len" "energy"; gap: 20px; }
  .seg { flex-wrap: wrap; gap: 6px; }
  .opt-mood .seg .choice { flex: 1 1 28%; }
  .gen-act .btn { flex: 1 1 0; }
  .mine-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .alb { flex-basis: clamp(104px, calc((100vw - 68px) / 2.3), 180px); }
}
@media (max-width: 380px) {
  h1 { font-size: 42px; }
  .alb-m { font-size: 10.5px; letter-spacing: 0; } /* "8 tracks · 20 min" stays on one line on a 360 px phone */
  .play { min-width: 128px; padding: 0 20px 0 18px; }
  .vol { gap: 10px; letter-spacing: .12em; }
  .vol input { width: 84px; }
}
/* Fingers get 44 px targets. */
@media (pointer: coarse) {
  .btn, .back, .linkish, .site-foot a { min-height: 44px; }
  .scrub { height: 44px; }
}
/* With a mouse, the Ready hint wraps to two lines on narrower screens: keep room for both so the panel does not move. */
@media (max-width: 1000px) and (pointer: fine) {
  .status { min-height: 3em; min-height: 2lh; }
}
@media (prefers-reduced-motion: reduce) {
  .plane, .eq i, .alb-now i, .alb.cur.playing .alb-now i { animation: none; }
  .btn, .play, .face, .trk, .back, .alb, .alb-art, .labels, .rail { transition: none; }
  .alb:hover .alb-art { transform: none; }
  /* the live spectrum is decoration that never sits still: leave it out */
  .cell.fft { display: none; }
  .bottom { grid-template-columns: 1fr 1fr; }
}
/* Phones: the readouts stack. A long section or voice name keeps a readable size across the whole width, a long voice
 * description reads as a sentence rather than a narrow column, and the time and beats share a row. */
@media (max-width: 600px) {
  .bottom { grid-template-columns: minmax(0, 1fr); }
  .cell + .cell { border-left: 0; border-top: 1px solid var(--rule); }
  .cell.sec { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 14px; padding-bottom: 12px; }
  .cell.sec .k, .cell.sec .big { grid-column: 1 / -1; }
  .cell.sec .beats { margin-top: 0; }
  .time .sep { display: inline; }
  #secBar { display: inline; }
}
