/* Music page: muted sage canvas, oversized tight headlines, mono tags, hard-edged colour blocks */
body.music {
  --ink: #1e1e1e; --ink-soft: #3d3d3d; --sage: #abbab9;
  --c1: #5fd3c4; --c2: #ff7a59; --c3: #ffd23f; --c4: #b9a4ff; --c5: #8fd16b; --c6: #ff9ec7;
  background: var(--sage); color: var(--ink-soft); color-scheme: light;
  font: 500 17px/1.35 "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; letter-spacing: .01em;
}
.music .wrap { max-width: 1160px; padding: 20px 16px; }
.music a { color: inherit; }
.music .topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.music .back, .music .mono-btn {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none;
  padding: 10px 16px; font-size: 1.05rem; font-weight: 500;
}
.music .back:hover { background: var(--c2); color: var(--ink); }
.music .tag, .music .meta {
  font: 400 .8rem/1 ui-monospace, "JetBrains Mono", "SF Mono", Menlo, monospace; letter-spacing: .03em;
  display: inline-block; border: 1px solid var(--ink-soft); padding: 5px 8px; color: var(--ink-soft);
}
.music .hero { text-align: center; padding: 20px 0 14px; }
.music h1 {
  font-weight: 500; font-size: clamp(2rem, 9.5vw, 5.5rem); line-height: .82; letter-spacing: -.055em;
  margin: 9px 0 11px; color: var(--ink-soft);
}
.music h1 span { display: inline-block; }
.music h1 .dot { color: var(--c2); }
.music .hero .meta { margin: 0 3px; }
.music .intro { max-width: 34em; margin: 22px auto 0; font-size: 1.15rem; color: var(--ink); }
.music h2 {
  font-weight: 400; font-size: clamp(2.4rem, 9vw, 4.2rem); line-height: .9; letter-spacing: -.04em;
  margin: 44px 0 18px; color: var(--ink-soft);
}
.music .muted { color: var(--ink-soft); }
.music #picks { counter-reset: pick; }
.music .card.pick {
  counter-increment: pick; border: 1.5px solid var(--ink); border-radius: 0; background: var(--c1);
  position: relative; transition: transform .15s, box-shadow .15s;
}
.music .card.pick:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); border-color: var(--ink); }
/* 20 song colours, hue-strided so neighbours (across and down) never look alike */
.music .card.pick:nth-child(20n+1) { background: hsl(8 85% 70%); }
.music .card.pick:nth-child(20n+2) { background: hsl(134 85% 70%); }
.music .card.pick:nth-child(20n+3) { background: hsl(260 85% 70%); }
.music .card.pick:nth-child(20n+4) { background: hsl(26 85% 70%); }
.music .card.pick:nth-child(20n+5) { background: hsl(152 85% 70%); }
.music .card.pick:nth-child(20n+6) { background: hsl(278 85% 70%); }
.music .card.pick:nth-child(20n+7) { background: hsl(44 85% 70%); }
.music .card.pick:nth-child(20n+8) { background: hsl(170 85% 70%); }
.music .card.pick:nth-child(20n+9) { background: hsl(296 85% 70%); }
.music .card.pick:nth-child(20n+10) { background: hsl(62 85% 70%); }
.music .card.pick:nth-child(20n+11) { background: hsl(188 85% 70%); }
.music .card.pick:nth-child(20n+12) { background: hsl(314 85% 70%); }
.music .card.pick:nth-child(20n+13) { background: hsl(80 85% 70%); }
.music .card.pick:nth-child(20n+14) { background: hsl(206 85% 70%); }
.music .card.pick:nth-child(20n+15) { background: hsl(332 85% 70%); }
.music .card.pick:nth-child(20n+16) { background: hsl(98 85% 70%); }
.music .card.pick:nth-child(20n+17) { background: hsl(224 85% 70%); }
.music .card.pick:nth-child(20n+18) { background: hsl(350 85% 70%); }
.music .card.pick:nth-child(20n+19) { background: hsl(116 85% 70%); }
.music .card.pick:nth-child(20n+20) { background: hsl(242 85% 70%); }
.music .pick .body { padding: 18px 18px 16px; color: var(--ink); }
.music .pick .body::before {
  content: counter(pick, decimal-leading-zero);
  font: 400 .8rem/1 ui-monospace, "JetBrains Mono", Menlo, monospace; letter-spacing: .05em;
  display: inline-block; border: 1px solid var(--ink); padding: 5px 8px; margin-bottom: 40px;
}
.music .pick h3 { font-size: 2rem; line-height: .95; letter-spacing: -.035em; font-weight: 500; margin: 0 0 10px; }
.music .pick .muted {
  font: 400 .8rem/1 ui-monospace, "JetBrains Mono", Menlo, monospace; letter-spacing: .03em;
  color: var(--ink); background: rgba(255,255,255,.55); padding: 5px 8px; display: inline-block;
}
.music .pick p { color: var(--ink); }
.music .pick-audio { width: 100%; margin-top: 16px; border-radius: 0; filter: contrast(1.05); }
.music .pick .links a { border-color: var(--ink); border-radius: 0; background: rgba(255,255,255,.55); }
.music .pick .links a:hover { background: var(--ink); color: #fff; }
.music footer { color: var(--ink-soft); font: 400 .8rem/1 ui-monospace, Menlo, monospace; text-align: center; padding: 40px 16px; }
.music .stripe { display: flex; height: 10px; margin: 26px 0 0; }
.music .stripe i { flex: 1; }
.music .stripe i:nth-child(1) { background: var(--c1); } .music .stripe i:nth-child(2) { background: var(--c2); }
.music .stripe i:nth-child(3) { background: var(--c3); } .music .stripe i:nth-child(4) { background: var(--c4); }
.music .stripe i:nth-child(5) { background: var(--c5); } .music .stripe i:nth-child(6) { background: var(--c6); }
@media (max-width: 520px) { .music .pick h3 { font-size: 1.7rem; } }

/* now-playing motion (kept subtle) */
.music .pick .eq { position: absolute; top: 18px; right: 18px; display: flex; align-items: flex-end; gap: 2px; height: 22px; opacity: 0; transition: opacity .25s; }
.music .pick .eq i { width: 3px; height: 100%; background: var(--ink); transform-origin: bottom; transform: scaleY(var(--s, .15)); transition: transform .09s linear; }
.music .pick.playing .eq { opacity: .85; }
.music .pick.playing { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); filter: brightness(calc(1 + var(--lvl, 0) * .05)); }
.music .pick.fake .eq i { animation: eqbounce .9s ease-in-out infinite alternate; }
.music .pick.fake .eq i:nth-child(3n) { animation-duration: .7s; }
.music .pick.fake .eq i:nth-child(3n+1) { animation-duration: 1.1s; animation-delay: -.3s; }
.music .pick.fake .eq i:nth-child(4n) { animation-delay: -.5s; }
@keyframes eqbounce { from { transform: scaleY(.15); } to { transform: scaleY(.9); } }
@media (prefers-reduced-motion: reduce) { .music .pick, .music .pick .eq i { transition: none; animation: none !important; } }

/* BIG mode (default): a compact banner of dancing blobs. Add ?fx=subtle to the URL for the small version */
.fx-big { --lvl: 0; transition: background-color .8s; }
.fx-big #stage {
  --stage: var(--sage); position: relative; overflow: hidden; margin: 8px 0 12px; height: clamp(140px, 24vh, 230px);
  border: 1.5px solid var(--ink); background: var(--stage); padding: 24px 14px 12px; color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; transition: background-color .7s;
}
.fx-big #stage .tag { position: relative; z-index: 1; }
.fx-big #stage .stage-title { position: relative; z-index: 1; margin-top: 8px; line-height: .9; letter-spacing: -.045em; font-weight: 500; transform-origin: left top; transform: scale(calc(1 + var(--lvl, 0) * .04)); }
.fx-big #stage .stage-artist { position: relative; z-index: 1; margin-top: 6px; font: 400 .8rem/1 ui-monospace, Menlo, monospace; }
.fx-big #stage .tag, .fx-big #stage .stage-title, .fx-big #stage .stage-artist { max-width: 36%; }
.fx-big #stage .stage-title { font-size: clamp(1.4rem, 3.6vw, 2.8rem); }
.fx-big #stage .stage-canvas { position: absolute; top: 18px; right: 0; bottom: 0; width: 62%; height: calc(100% - 18px); display: block; }
@media (max-width: 640px) {
  .fx-big #stage .tag, .fx-big #stage .stage-title, .fx-big #stage .stage-artist { max-width: 100%; }
  .fx-big #stage .stage-title { font-size: 1.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fx-big #stage .stage-artist { display: none; }
  .fx-big #stage .stage-canvas { top: auto; left: 0; width: 100%; height: 55%; }
}
.fx-big .hero h1 { transform: scale(calc(1 + var(--lvl, 0) * .05)); }
@media (prefers-reduced-motion: reduce) { .fx-big .hero h1, .fx-big #stage .stage-title { transition: none; transform: none; } }

/* Song tiles: five to a row on desktop; the whole tile is the play/pause button */
.music #picks { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .music #picks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .music #picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .music #picks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.music .card.pick { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; min-height: 158px; }
.music .card.pick:focus-visible, .fx-big #stage:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.music .pick .body {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; gap: 6px 8px;
  align-items: start; height: 100%; min-height: 158px; padding: 10px 10px 18px;
}
.music .pick .body::before { grid-area: 1 / 1; justify-self: start; margin: 0; padding: 4px 6px; font-size: .7rem; }
.music .pick .pbtn { grid-area: 1 / 2; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
.music .pick.playing .pbtn { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.music .pick .info { grid-area: 2 / 1 / 3 / 3; align-self: end; min-width: 0; padding: 0; }
.music .pick h3 {
  font-size: clamp(1rem, 1.55vw, 1.22rem); line-height: 1.06; margin: 0; letter-spacing: -.03em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.music .pick .info .muted { margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music .pick .pt { grid-area: 3 / 1 / 4 / 3; font: 400 .7rem/1 ui-monospace, Menlo, monospace; color: var(--ink); min-height: .7rem; }
.music .pick .seek { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: rgba(30, 30, 30, .15); cursor: pointer; }
.music .pick .seek::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: 0; }
.music .pick .seek i { display: block; height: 100%; width: 0; background: var(--ink); pointer-events: none; }
.music .pick .eq { right: 48px; top: 16px; transform: none; }
.fx-big #stage { cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

/* Jukebox banner: marquee bulbs, beat lamps and a pause button */
.fx-big #stage.on { box-shadow: 0 0 0 calc(var(--beat, 0) * 5px) rgba(30, 30, 30, .2); }
.fx-big #stage .bulbs { position: absolute; z-index: 2; top: 6px; left: 10px; right: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.fx-big #stage .bulbs i { width: 7px; height: 7px; border-radius: 50%; background: rgba(30, 30, 30, .22); animation: bulb 1.8s ease-in-out infinite; }
.fx-big #stage.on .bulbs i { animation: none; }
.fx-big #stage .bulbs i.on { background: var(--bc); box-shadow: 0 0 6px 1px var(--bc); }
@keyframes bulb { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.fx-big #stage .stage-ctl { position: absolute; z-index: 2; left: 14px; bottom: 10px; display: flex; align-items: center; gap: 10px; }
.fx-big #stage .lamps { display: flex; gap: 5px; }
.fx-big #stage .lamps i { width: 12px; height: 12px; border: 1.5px solid var(--ink); background: rgba(255, 255, 255, .35); transition: background .08s; }
.fx-big #stage .lamps i.on { background: var(--ink); }
.fx-big #stage .lamps i.on.dn { background: #fff; box-shadow: 0 0 0 2px var(--ink); transform: scale(1.25); }
.fx-big #stage .stage-pause { font: 400 .72rem/1 ui-monospace, Menlo, monospace; background: var(--ink); color: #fff; border: 0; padding: 7px 9px; cursor: pointer; }
.fx-big #stage .stage-pause[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .fx-big #stage .bulbs i { animation: none; } .fx-big #stage.on { box-shadow: none; } }
@media (max-width: 640px) { .fx-big #stage .stage-ctl { top: 26px; bottom: auto; right: 10px; left: auto; } }

/* Install panel */
.music .mono-btn { border: 0; font: inherit; font-size: 1.05rem; font-weight: 500; cursor: pointer; }
.music .mono-btn:hover { background: var(--c2); color: var(--ink); }
.music .appstatus { padding: 0 16px 6px; margin: 0 auto; text-align: right; font: 400 .85rem/1.4 ui-monospace, Menlo, monospace; color: var(--ink); }
.music .appstatus[hidden], .music .appstatus [hidden] { display: none; }
.music .ga-link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; margin-left: 8px; }
.music .topright { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.music .mono-btn[hidden] { display: none; }
.music .back, .music .mono-btn { white-space: nowrap; }
@media (max-width: 520px) { .music .back, .music .mono-btn { padding: 9px 11px; font-size: .9rem; } .music .topright .tag { display: none; } }
.music .getapp {
  position: relative; display: flex; align-items: center; gap: 26px; margin: 14px 0 0; padding: 22px 26px;
  background: var(--c3); border: 2px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); overflow: hidden;
}
.music .getapp::before { content: ""; position: absolute; right: -50px; top: -50px; width: 190px; height: 190px; border-radius: 50%; background: var(--c6); opacity: .55; }
.music .getapp::after { content: ""; position: absolute; left: 36%; bottom: -70px; width: 150px; height: 150px; border-radius: 50%; background: var(--c1); opacity: .5; }
.music .ga-art { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 16px; flex: none; }
.music .ga-art img { display: block; width: 84px; height: 84px; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); transform: rotate(-6deg); background: var(--sage); }
.music .ga-eq { display: flex; align-items: flex-end; gap: 0; height: 80px; }
.music .ga-eq i { width: 14px; height: 56px; background: radial-gradient(circle at 50% 50%, hsl(var(--hu) 88% 52%) 0 5.4px, transparent 5.9px) 0 100% / 14px 14px repeat-y; animation: gaeq 1.1s steps(1, end) infinite; }
.music .ga-eq i:nth-child(10n+1) { --hu: 8; animation-duration: .9s; } .music .ga-eq i:nth-child(10n+2) { --hu: 44; animation-duration: 1.3s; animation-delay: -.2s; }
.music .ga-eq i:nth-child(10n+3) { --hu: 98; animation-duration: 1s; animation-delay: -.5s; } .music .ga-eq i:nth-child(10n+4) { --hu: 170; animation-duration: 1.2s; animation-delay: -.1s; }
.music .ga-eq i:nth-child(10n+5) { --hu: 206; animation-duration: .8s; animation-delay: -.4s; } .music .ga-eq i:nth-child(10n+6) { --hu: 260; animation-duration: 1.4s; animation-delay: -.7s; }
.music .ga-eq i:nth-child(10n+7) { --hu: 296; animation-duration: 1s; animation-delay: -.3s; } .music .ga-eq i:nth-child(10n+8) { --hu: 332; animation-duration: 1.15s; animation-delay: -.6s; }
.music .ga-eq i:nth-child(10n+9) { --hu: 26; animation-duration: .95s; animation-delay: -.8s; } .music .ga-eq i:nth-child(10n+10) { --hu: 134; animation-duration: 1.25s; animation-delay: -.15s; }
@keyframes gaeq { 0% { height: 28px; } 20% { height: 70px; } 40% { height: 42px; } 60% { height: 84px; } 80% { height: 56px; } 100% { height: 28px; } }
.music .ga-body { position: relative; z-index: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.music .getapp h3 { margin: 0; font-size: clamp(1.7rem, 4.6vw, 2.6rem); line-height: .95; letter-spacing: -.045em; font-weight: 600; color: var(--ink); }
.music .getapp .ga-sub { margin: 0; font-size: 1.1rem; color: var(--ink); }
.music .getapp progress { width: min(360px, 100%); height: 12px; accent-color: var(--ink); margin: 6px 0 2px; }
.music .getapp .ga-btn {
  margin-top: 10px; font: 600 1.35rem/1 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: -.01em; background: var(--ink); color: #fff;
  border: 0; padding: 18px 28px; cursor: pointer; box-shadow: 5px 5px 0 var(--c2); transition: transform .12s, box-shadow .12s; animation: gapulse 2.4s ease-in-out infinite;
}
.music .getapp .ga-btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--c2); }
.music .getapp .ga-btn:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--c2); }
@keyframes gapulse { 0%, 100% { box-shadow: 5px 5px 0 var(--c2); } 50% { box-shadow: 5px 5px 0 var(--c2), 0 0 0 7px rgba(30, 30, 30, .12); } }
.music .getapp .ga-note { margin: 2px 0 0; font: 400 .85rem/1.3 ui-monospace, Menlo, monospace; color: var(--ink); min-height: 1.1em; }
.music .getapp .ga-link { background: none; border: 0; padding: 0; font: 400 .8rem/1 ui-monospace, Menlo, monospace; color: var(--ink); text-decoration: underline; cursor: pointer; }
.music .getapp [hidden] { display: none; }
@media (max-width: 640px) {
  .music .getapp { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px 18px 22px; }
  .music .ga-art { justify-content: space-between; }
  .music .ga-art img { width: 64px; height: 64px; }
  .music .getapp .ga-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .music .ga-eq i, .music .getapp .ga-btn { animation: none; } }

/* step-by-step install help */
.music .helpdlg { border: 2px solid var(--ink); background: #fff; color: var(--ink); box-shadow: 7px 7px 0 var(--ink); padding: 22px 24px; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
.music .helpdlg::backdrop { background: rgba(30,30,30,.55); }
.music .helpdlg h3 { margin: 0 0 6px; font-size: clamp(1.5rem, 5vw, 2.1rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.music .helpdlg h4 { margin: 18px 0 6px; font: 600 .8rem/1 ui-monospace, Menlo, monospace; letter-spacing: .05em; text-transform: uppercase; }
.music .helpdlg ol { margin: 0; padding-left: 1.4em; }
.music .helpdlg li { margin: 0 0 9px; font-size: 1rem; line-height: 1.4; }
.music .helpdlg .help-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.music .helpdlg .mono-btn { background: var(--ink); color: #fff; padding: 10px 16px; }
