/* grayfull — gray site chrome; each song brings its own colors (--c1 --c2 --c3 --bg). */
:root {
  --bg: #0d0d10;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.10);
  --ink: #f3f3f5;
  --muted: #a0a0aa;
  --dim: #5a5a64;
  --c1: #d9d9e0;   /* main song color (karaoke fill, buttons) */
  --c2: #8c8c96;   /* secondary song color */
  --c3: #5e5e68;   /* third song color */
  --on-c1: #111;   /* text on top of --c1 */
  --ui: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --r-lg: 26px;
  --r-md: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--c1); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.icon { width: 1em; height: 1em; display: block; fill: currentColor; }

/* ---------- song color wash (fixed behind everything) ---------- */
.wash { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); transition: background .8s; }
.wash i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(90px); opacity: .34; will-change: transform; }
.wash i:nth-child(1) { background: var(--c1); top: -30vmax; left: -20vmax; animation: drift1 26s var(--ease) infinite alternate; }
.wash i:nth-child(2) { background: var(--c2); bottom: -35vmax; right: -25vmax; animation: drift2 32s var(--ease) infinite alternate; }
.wash i:nth-child(3) { background: var(--c3); top: 30%; left: 35%; width: 45vmax; height: 45vmax; opacity: .2; animation: drift3 40s var(--ease) infinite alternate; }
.wash::after { content: ''; position: absolute; inset: 0; background:
  radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,.35) 70%),
  linear-gradient(180deg, rgba(13,13,16,.15), rgba(13,13,16,.75)); }
@keyframes drift1 { to { transform: translate(12vmax, 8vmax) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-10vmax, -12vmax) scale(1.12); } }
@keyframes drift3 { to { transform: translate(-14vmax, 6vmax) scale(.9); } }

/* ---------- top bar & wordmark ---------- */
.topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(16px, 3vw, 34px); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark .mark { width: 30px; height: 30px; flex: none; }
.wordmark .name { font-family: var(--ui); font-weight: 700; font-size: 22px; letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 10%, #a9a9b3 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-actions { display: flex; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); backdrop-filter: blur(10px);
  border-radius: 999px; padding: 9px 15px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .2s; }
.pill:hover { background: var(--surface-2); }
.pill .icon { width: 16px; height: 16px; }

/* ---------- home ---------- */
.home { position: relative; z-index: 2; max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 3vw, 34px) 80px; }
.home-hero { padding: clamp(28px, 7vw, 90px) 0 clamp(26px, 5vw, 50px); }
.home-hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(46px, 9vw, 118px); line-height: .92; letter-spacing: -0.05em; margin: 0; }
.home-hero h1 .soft { color: var(--dim); }
.home-hero p { color: var(--muted); font-size: clamp(16px, 2vw, 20px); margin: 18px 0 0; max-width: 520px; }
.featured { display: grid; grid-template-columns: minmax(200px, 360px) 1fr; gap: clamp(20px, 4vw, 44px); align-items: center; text-decoration: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 18%, transparent), color-mix(in srgb, var(--c2) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 30%, var(--line)); border-radius: 32px; padding: clamp(16px, 2.4vw, 26px); margin-bottom: 44px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.featured:hover { transform: translateY(-3px); box-shadow: 0 30px 80px -30px color-mix(in srgb, var(--c1) 55%, transparent); }
.featured img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; display: block; box-shadow: 0 24px 60px -18px rgba(0,0,0,.7); }
.featured .tag { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--c1); }
.featured h2 { font-family: var(--display); font-size: clamp(30px, 4.6vw, 58px); line-height: 1; letter-spacing: -0.04em; margin: 12px 0 10px; }
.featured .by { color: var(--muted); font-size: 17px; }
.featured .go { margin-top: 26px; display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; }
.go .disc { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--c1); color: var(--on-c1);
  box-shadow: 0 12px 34px -8px color-mix(in srgb, var(--c1) 70%, transparent); }
.go .disc .icon { width: 22px; height: 22px; margin-left: 3px; }
.section-title { font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.card { text-decoration: none; display: block; border-radius: 22px; padding: 10px; background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s var(--ease), background .3s; }
.card:hover { transform: translateY(-4px); background: color-mix(in srgb, var(--c1) 14%, var(--surface)); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 15px; display: block; }
.card .t { font-weight: 600; font-size: 16px; margin: 12px 6px 2px; }
.card .d { color: var(--muted); font-size: 13px; margin: 0 6px 6px; }
.empty { color: var(--muted); }

/* ---------- player ---------- */
.player { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 72px); max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 34px);
  height: calc(100vh - 76px); height: calc(100dvh - 76px); }
.deck { align-self: center; display: flex; flex-direction: column; gap: 22px; padding-bottom: 30px; }
.cover-wrap { position: relative; }
.cover { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: var(--r-lg); background: var(--surface);
  box-shadow: 0 40px 90px -30px color-mix(in srgb, var(--c1) 60%, transparent), 0 20px 50px -20px rgba(0,0,0,.8); transition: transform .6s var(--ease); }
.playing .cover { transform: scale(1.015); }
.meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.song-title { font-family: var(--display); font-weight: 800; font-size: clamp(26px, 2.7vw, 38px); line-height: 1.02; letter-spacing: -0.04em; margin: 0; }
.song-artist { color: var(--muted); font-size: 17px; margin: 6px 0 0; font-weight: 500; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; flex: none; opacity: 0; transition: opacity .3s; }
.eq span { width: 4px; border-radius: 2px; background: var(--c1); height: 30%; }
.playing .eq { opacity: 1; }
.playing .eq span { animation: eq 1s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: -.3s !important; }
.eq span:nth-child(3) { animation-delay: -.6s !important; }
.eq span:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

.transport { display: flex; flex-direction: column; gap: 14px; }
.progress { position: relative; height: 18px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.progress .rail { position: absolute; left: 0; right: 0; height: 5px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; transition: height .2s; }
.progress .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--c2), var(--c1)); }
.progress .knob { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c1) 35%, transparent), 0 4px 12px rgba(0,0,0,.5); transform: scale(0); transition: transform .2s; }
.progress:hover .rail, .progress:focus-visible .rail { height: 7px; }
.progress:hover .knob, .progress:focus-visible .knob, .progress.dragging .knob { transform: scale(1); }
.times { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; margin-top: -6px; }
.buttons { display: flex; align-items: center; justify-content: center; gap: 20px; }
.btn-round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center;
  transition: background .2s, transform .15s; }
.btn-round:hover { background: var(--surface-2); }
.btn-round:active { transform: scale(.92); }
.btn-round .icon { width: 24px; height: 24px; }
.btn-play { width: 74px; height: 74px; background: var(--c1); color: var(--on-c1);
  box-shadow: 0 16px 40px -10px color-mix(in srgb, var(--c1) 75%, transparent); }
.btn-play:hover { background: var(--c1); filter: brightness(1.08); }
.btn-play .icon { width: 30px; height: 30px; }
.btn-play:disabled { opacity: .6; cursor: progress; }
.keys { color: var(--dim); font-size: 12.5px; text-align: center; margin: 0; }
.keys kbd { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--muted); }

/* lyrics: their own scroller with soft fades at the edges */
.lyrics { position: relative; height: 100%; overflow-y: auto; scrollbar-width: none; padding: 34vh 0 48vh; overscroll-behavior: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%, #000 72%, transparent 100%); }
.lyrics::-webkit-scrollbar { display: none; }
.lyric { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; margin: 0; padding: 12px 16px; border-radius: 18px;
  font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 46px); line-height: 1.16; letter-spacing: -0.03em;
  opacity: .32; transform-origin: left center; transition: opacity .45s var(--ease), transform .45s var(--ease), filter .45s var(--ease); }
.lyric:hover { background: rgba(255,255,255,.04); }
.lyric.near { opacity: .55; }
.lyric.past { opacity: .24; }
.lyric.current { opacity: 1; transform: scale(1.035); filter: drop-shadow(0 0 22px color-mix(in srgb, var(--c1) 38%, transparent)); }
.lyric .w { --p: 0; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, var(--c1) 0, var(--c1) calc(var(--p) * 100%), var(--unsung) calc(var(--p) * 100%), var(--unsung) 100%); }
.lyric { --unsung: #f3f3f5; }
.lyric.current { --unsung: rgba(255,255,255,.62); }
.lyric.spoken { font-style: italic; font-weight: 600; }
.section-label { display: flex; align-items: center; gap: 10px; margin: 34px 16px 6px; font-size: 12px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); opacity: .8; }
.section-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- sync mode ---------- */
.syncbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px;
  background: rgba(16,16,20,.94); border-top: 1px solid var(--line); backdrop-filter: blur(12px); }
.syncbar .status { flex: 1; min-width: 180px; color: var(--muted); font-size: 14px; }
.syncbar button, .syncbar select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; cursor: pointer; font-size: 14px; color: var(--ink); }
.syncbar button.primary { background: var(--c1); color: var(--on-c1); border: 0; font-weight: 700; }
.lyric .stamp { font-family: var(--ui); font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.lyric.selected { outline: 2px dashed var(--c1); }
.lyric.edited .stamp { color: var(--c1); }
body.syncing .lyrics { padding-bottom: 60vh; }

/* ---------- phones & small screens ---------- */
.head { display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 880px) {
  .topbar { padding: 14px 16px; }
  .player { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head" "lyrics" "transport";
    height: calc(100vh - 68px); height: calc(100dvh - 68px); gap: 0; padding: 0; }
  .deck { display: contents; }
  .head { grid-area: head; flex-direction: row; align-items: center; gap: 14px; padding: 0 16px 6px; }
  .cover { width: 64px; height: 64px; border-radius: 14px; flex: none; }
  .meta { flex: 1; min-width: 0; }
  .song-title { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .song-artist { font-size: 14px; margin-top: 2px; }
  .eq { height: 16px; }
  .lyrics { grid-area: lyrics; padding: 22vh 4px 40vh; }
  .lyric { font-size: clamp(24px, 7vw, 32px); padding: 10px 14px; }
  .transport { grid-area: transport; padding: 10px 18px calc(14px + env(safe-area-inset-bottom)); gap: 8px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 35%); }
  .btn-play { width: 62px; height: 62px; }
  .keys { display: none; }
  .featured { grid-template-columns: 1fr; }
  body.syncing .transport { padding-bottom: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .wash i, .playing .eq span { animation: none; }
  .lyric, .cover, .card, .featured { transition: none; }
}
