/* The Meltify web player. Same colours and shapes as the app and the site. */
:root {
  color-scheme: dark;
  --ink: #0C0710;
  --ink-2: #140C1B;
  --glass: 0.72;              /* how solid the panels are; Settings changes it */
  --panel: rgb(24 16 30 / var(--glass));
  --panel-2: rgba(255, 240, 248, 0.07);
  --panel-3: rgba(255, 240, 248, 0.12);
  --line: rgba(255, 228, 242, 0.12);
  --text: #F7EEF3;
  --muted: #B9A7B5;
  --faint: #7F6C7C;
  --melt: #FF3B5C;            /* the accent: a look's colour, or the colours of the cover playing */
  --melt-hi: color-mix(in srgb, var(--melt) 74%, white);
  --melt-glow: color-mix(in srgb, var(--melt) 65%, transparent);
  --c1: #FF3B5C; --c2: #7B2FF7; --c3: #FF8A3D;
  --bg-blur: 66px; --bg-bright: 0.53; --bg-speed: 48s;
  --ly-font: var(--display); --ly-weight: 800; --ly-gap: 1; --ly-align: left; --ly-case: none;
  --violet: #7B2FF7;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --r: 22px;
  --ly: 22px;                 /* lyric size in the side panel; Settings changes it */
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--text); font: 400 15px/1.5 var(--body);
  overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--melt-hi); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--melt) 45%, transparent); }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 228, 242, 0.18) transparent; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.solid { fill: currentColor; stroke: none; }

/* -- what is behind everything: drifting blobs of colour, the cover blurred, a gradient, or your own picture -- */
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); }
.backdrop .pic {
  position: absolute; inset: -110px; background: center / cover no-repeat;
  filter: blur(var(--bg-blur)) saturate(1.45) brightness(var(--bg-bright)); transition: background-image 0.8s ease;
}
.backdrop .blobs {
  position: absolute; inset: -30%; filter: blur(calc(var(--bg-blur) * 1.5)) saturate(1.25) brightness(calc(var(--bg-bright) + 0.12));
  animation: turn var(--bg-speed) linear infinite;
}
.blob { position: absolute; border-radius: 50%; opacity: 0.9; transition: background-color 1.2s ease; }
.blob.b1 { left: 14%; top: 14%; width: 44%; height: 44%; background: var(--c1); }
.blob.b2 { right: 10%; top: 28%; width: 40%; height: 40%; background: var(--c2); }
.blob.b3 { left: 32%; bottom: 8%; width: 42%; height: 42%; background: var(--c3); }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translate(-7%, -5%) scale(1); } to { transform: translate(9%, 7%) scale(1.16); } }
body[data-motion="drift"] .blobs { animation: none; }
body[data-motion="drift"] .blob { animation: drift calc(var(--bg-speed) * 0.35) ease-in-out infinite alternate; }
body[data-motion="drift"] .blob.b2 { animation-direction: alternate-reverse; animation-duration: calc(var(--bg-speed) * 0.45); }
body[data-motion="still"] .blobs, body[data-motion="still"] .blob { animation: none; }
body:not([data-bg="blobs"]) .blobs { display: none; }
body[data-bg="blobs"] .pic, body[data-bg="gradient"] .pic { display: none; }
body[data-bg="gradient"] .backdrop {
  background: radial-gradient(1100px 800px at 0% 0%, color-mix(in srgb, var(--c2) 75%, transparent), transparent 62%),
    radial-gradient(1000px 800px at 100% 100%, color-mix(in srgb, var(--c3) 38%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--c1) 70%, #000), #000 75%);
  filter: brightness(calc(var(--bg-bright) + 0.5));
}
.backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(12, 7, 16, 0.3); }

/* -- the frame ------------------------------------------------------------------------------ */
.app {
  position: relative; z-index: 1; height: 100dvh; display: grid; gap: 10px; padding: 10px;
  grid-template: "top top top" auto "side view now" minmax(0, 1fr) "bar bar bar" auto / 290px minmax(0, 1fr) 340px;
}
.top { grid-area: top; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 2px 4px; }
.side, .view, .now, .bar {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  backdrop-filter: blur(26px) saturate(1.3); -webkit-backdrop-filter: blur(26px) saturate(1.3);
}
.side { grid-area: side; overflow-y: auto; padding: 16px 12px; }
.view { grid-area: view; container: view / inline-size; overflow-y: auto; padding: 28px 30px 40px; outline: none; scroll-behavior: smooth; }
.now { grid-area: now; display: flex; flex-direction: column; min-height: 0; padding: 14px; gap: 12px; }
.bar { grid-area: bar; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 18px; padding: 10px 18px; }
.bar-end .ib { width: 38px; height: 38px; }
.tabs { display: none; }
.grow { flex: 1; }

/* -- top bar ---------------------------------------------------------------------------------- */
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px/1 var(--display); letter-spacing: -0.02em; width: 150px; flex: none; }
.brand img { border-radius: 10px; }
.hist { display: flex; gap: 6px; }
.ib {
  width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--panel-2); color: var(--text); transition: background 0.15s, transform 0.15s, color 0.15s;
}
.ib:hover { background: var(--panel-3); }
.ib:active { transform: scale(0.94); }
.ib:disabled { opacity: 0.35; cursor: default; }
.ib[aria-pressed="true"], .ib.on { color: var(--melt-hi); }
.ib.bare { background: none; }
.ib.small { width: 34px; height: 34px; }
.ib.small svg { width: 18px; height: 18px; }
.ib.home { background: var(--melt); color: #fff; box-shadow: 0 8px 24px -8px var(--melt-glow); }
.find {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); transition: border-color 0.15s, background 0.15s;
}
.find:focus-within { border-color: color-mix(in srgb, var(--melt-hi) 70%, transparent); background: var(--panel-3); }
.find input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); font-size: 15px; }
.find input::placeholder { color: var(--muted); }
.find input::-webkit-search-cancel-button { filter: invert(1) opacity(0.6); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 999px;
  border: 0; background: var(--melt); color: #fff; font-weight: 600; font-size: 14.5px; white-space: nowrap;
  box-shadow: 0 10px 28px -10px var(--melt-glow); transition: background 0.15s, transform 0.15s;
}
.pill:hover { background: var(--melt-hi); }
.pill:active { transform: scale(0.97); }
.pill:disabled { opacity: 0.5; cursor: default; }
.pill.ghost { background: var(--panel-2); border: 1px solid var(--line); box-shadow: none; color: var(--text); }
.pill.ghost:hover { background: var(--panel-3); }
.pill.small { min-height: 36px; padding: 0 16px; font-size: 13.5px; }
.pill svg { width: 18px; height: 18px; }

/* -- library (left) --------------------------------------------------------------------------- */
.side h2 { font: 700 16px/1 var(--body); padding: 4px 8px 14px; display: flex; align-items: center; justify-content: space-between; }
.side .pill { width: 100%; margin-bottom: 12px; }
.lib-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 14px; }
.lib-item:hover { background: var(--panel-2); }
.lib-item.is-here { background: var(--panel-3); }
.lib-item.is-here b { color: var(--melt-hi); }
.art { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--panel-3); flex: none; }
.art.none { display: grid; place-items: center; color: var(--faint); }
.art.liked { display: grid; place-items: center; background: linear-gradient(135deg, #7B2FF7, var(--melt)); color: #fff; }
.art.mix { display: grid; grid-template: 1fr 1fr / 1fr 1fr; overflow: hidden; }
.art.mix img { width: 100%; height: 100%; object-fit: cover; }
.names { min-width: 0; display: flex; flex-direction: column; }
button.names { border: 0; background: none; padding: 0; text-align: left; cursor: default; }
.names b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.names span { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* -- the middle: views ------------------------------------------------------------------------ */
.h1 { font: 800 clamp(30px, 4vw, 44px)/1.05 var(--display); letter-spacing: -0.03em; }
.sub { color: var(--muted); margin-top: 6px; }
.section { margin-top: 34px; }
.section > h2 { font: 700 20px/1.2 var(--body); margin-bottom: 14px; display: flex; align-items: baseline; gap: 12px; }
.section > h2 small { font-weight: 400; font-size: 13.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); font-size: 14px; font-weight: 500; }
.chip:hover, .chip.on { background: var(--panel-3); border-color: color-mix(in srgb, var(--melt-hi) 55%, transparent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card { display: block; padding: 12px; border-radius: 18px; background: var(--panel-2); border: 1px solid transparent; text-align: left; color: inherit; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.card:hover { background: var(--panel-3); border-color: var(--line); transform: translateY(-2px); }
.card .art { width: 100%; height: auto; aspect-ratio: 1; border-radius: 14px; margin-bottom: 10px; }
.card b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.quick button { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; padding: 0 12px 0 0; border: 0; border-radius: 14px; background: var(--panel-2); overflow: hidden; text-align: left; }
.quick button:hover { background: var(--panel-3); }
.quick .art { width: 56px; height: 56px; border-radius: 0; }

.hero { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.hero .art { width: 190px; height: 190px; border-radius: 22px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9); }
.hero .art.liked svg { width: 72px; height: 72px; }
.hero .about { min-width: 0; flex: 1 1 280px; }
.hero .kind { font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--melt-hi); }
.hero .h1 { margin: 6px 0 8px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.note { margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(255, 138, 61, 0.12); border: 1px solid rgba(255, 138, 61, 0.3); color: #FFD9BD; font-size: 14px; }

.rows { margin-top: 22px; display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: 30px 46px minmax(0, 1.5fr) minmax(0, 1fr) 52px 36px 36px; gap: 12px; align-items: center;
  padding: 7px 8px; border-radius: 14px; cursor: default; user-select: none;
}
.row:hover, .row:focus-within { background: var(--panel-2); }
.row .n { color: var(--faint); font-size: 13.5px; text-align: right; font-variant-numeric: tabular-nums; }
.row .art { width: 46px; height: 46px; border-radius: 10px; }
.row .album, .row .dur { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .dur { text-align: right; font-variant-numeric: tabular-nums; }
.row .ib { opacity: 0; }
.row:hover .ib, .row:focus-within .ib, .row .ib.on { opacity: 1; }
.row.is-current .names b { color: var(--melt-hi); }
.row.is-current .n { color: var(--melt-hi); }
.row .tag { display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; background: var(--panel-3); color: var(--muted); font-size: 10px; font-weight: 700; line-height: 16px; vertical-align: 1px; }
@container view (max-width: 700px) {
  .row { grid-template-columns: 30px 46px minmax(0, 1fr) 52px 36px 36px; }
  .row .album { display: none; }
}
@container view (max-width: 460px) {
  .row { grid-template-columns: 46px minmax(0, 1fr) 36px 36px; }
  .row .n, .row .dur { display: none; }
}
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.empty .pill { margin-top: 16px; }
.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px 4px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--panel-3); border-top-color: var(--melt-hi); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.box { padding: 22px; border-radius: calc(var(--r) * 0.9); background: var(--panel-2); border: 1px solid var(--line); }
.box + .box { margin-top: 14px; }
.box h3 { font: 600 17px/1.3 var(--body); margin-bottom: 4px; }
.box p { color: var(--muted); font-size: 14px; }
.field, .textarea {
  width: 100%; margin-top: 14px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.28);
  color: var(--text); outline: none; font-size: 15px;
}
.field:focus, .textarea:focus { border-color: color-mix(in srgb, var(--melt-hi) 70%, transparent); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.inline .field { margin-top: 0; flex: 1 1 220px; width: auto; }
.set { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.set:first-of-type { border-top: 0; }
.set > div { flex: 1; min-width: 0; }
.set b { display: block; font-weight: 600; }
.set span { color: var(--muted); font-size: 13.5px; }
.switch { width: 50px; height: 30px; flex: none; border-radius: 999px; border: 0; background: var(--panel-3); position: relative; transition: background 0.15s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.18s; }
.switch[aria-checked="true"] { background: var(--melt); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); align-self: flex-start; }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--text); }
.set.tall { flex-wrap: wrap; }
.set.tall > div:first-child { flex: 1 1 100%; }
.seg.wrap { flex-wrap: wrap; border-radius: 18px; max-width: 100%; }
.slide { flex: 0 1 240px; }
input.slide::-webkit-slider-thumb { opacity: 1; }
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.look {
  position: relative; height: 92px; padding: 12px; border-radius: calc(var(--r) * 0.8); border: 2px solid transparent; text-align: left; color: #fff;
  display: flex; align-items: flex-end; background: linear-gradient(135deg, var(--a), var(--b) 55%, var(--c)); overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.look::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.55)); }
.look b { position: relative; z-index: 1; font-weight: 600; font-size: 14.5px; }
.look svg { position: absolute; top: 9px; left: 10px; z-index: 1; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: #fff; color: #140C1B; stroke-width: 3; }
.look:hover { transform: translateY(-2px); }
.look.on { border-color: #fff; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; padding: 0; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--ink) inset; }
.sw.pick { background: var(--panel-3); position: relative; overflow: hidden; }
.sw.pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sw.pick svg { width: 16px; height: 16px; }
.chip.pair { display: inline-flex; padding: 0; overflow: hidden; }
.chip.pair button { border: 0; background: none; padding: 9px 6px 9px 16px; font: inherit; font-weight: 500; }
.chip.pair button + button { padding: 9px 12px 9px 4px; color: var(--muted); display: grid; place-items: center; }
.chip.pair button + button svg { width: 15px; height: 15px; }
.code { font: 800 clamp(44px, 9vw, 72px)/1 var(--display); letter-spacing: 0.08em; margin: 10px 0 4px; user-select: all; }
.people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.people span { padding: 6px 12px; border-radius: 999px; background: var(--panel-3); font-size: 13.5px; }
.limits { margin-top: 10px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.limits li { margin: 4px 0; }

/* -- now playing (right) ---------------------------------------------------------------------- */
.now-head { display: none; align-items: center; gap: 10px; }
.slot { width: 100%; aspect-ratio: 16 / 9; border-radius: calc(var(--r) * 0.75); background: linear-gradient(135deg, color-mix(in srgb, var(--melt) 55%, #000), color-mix(in srgb, var(--c2) 45%, #000)) center / cover no-repeat; flex: none; overflow: hidden; }
.now-meta { display: flex; align-items: center; gap: 10px; }
.now-meta .names { flex: 1; }
.now-meta .names b { font-size: 17px; }
.sheet-controls { display: none; }
#now-tabs { display: none; }
.lyrics, .upnext { flex: 1; min-height: 0; overflow-y: auto; border-radius: calc(var(--r) * 0.85); }
.lyrics {
  position: relative; padding: 18px 18px 40%; background: linear-gradient(160deg, color-mix(in srgb, var(--melt) 36%, transparent), color-mix(in srgb, var(--c2) 22%, transparent));
  border: 1px solid var(--line); scroll-behavior: smooth;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 46px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 26px, #000 calc(100% - 46px), transparent 100%);
}
.ly-head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 14px; }
.ly-head .grow { flex: 1; }
.ly-head small { color: rgba(255, 255, 255, 0.6); font-weight: 400; font-size: 12px; white-space: nowrap; }
.ly-head .ib { width: 30px; height: 30px; }
.ln {
  display: block; width: 100%; padding: 7px 0; border: 0; background: none; text-align: left; cursor: pointer;
  font: var(--ly-weight) var(--ly)/1.28 var(--ly-font); letter-spacing: -0.015em; color: rgba(255, 255, 255, 0.34);
  text-align: var(--ly-align); text-transform: var(--ly-case); padding-block: calc(7px * var(--ly-gap));
  transform-origin: var(--ly-align) center; transition: color 0.25s, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s;
}
.ln:hover { color: rgba(255, 255, 255, 0.62); }
.ln.past { color: rgba(255, 255, 255, 0.22); }
.ln.on { color: rgba(255, 255, 255, 0.4); transform: scale(1.04); }
.ln .c { transition: color 0.14s linear, text-shadow 0.3s; }
.ln.on .c.lit { color: #fff; text-shadow: 0 0 18px rgba(255, 255, 255, 0.3); }
/* the five lyric styles (Settings): letters is the one above */
body[data-ly="karaoke"] .ln.on { color: rgba(255, 255, 255, 0.62); }
body[data-ly="karaoke"] .ln.on .c.lit { color: var(--melt-hi); text-shadow: none; }
body[data-ly="bounce"] .ln .w { display: inline-block; white-space: pre; transition: transform 0.16s cubic-bezier(0.3, 1.6, 0.5, 1); }
body[data-ly="bounce"] .ln.on .w.sing { transform: translateY(-0.14em) scale(1.07); }
body[data-ly="glow"] .ln.on { color: #fff; text-shadow: 0 0 26px color-mix(in srgb, var(--melt) 85%, white), 0 0 3px rgba(255, 255, 255, 0.5); }
body[data-ly="glow"] .ln.on .c { color: inherit; text-shadow: none; }
body[data-ly="line"] .ln.on { color: #fff; }
body[data-ly="line"] .ln.on .c { color: inherit; text-shadow: none; }
.ln.dots { justify-content: var(--ly-align); }
.ln .roma { display: block; margin-top: 2px; font: 500 0.6em/1.3 var(--body); letter-spacing: 0; color: inherit; opacity: 0.85; }
.ln.plain { cursor: default; color: rgba(255, 255, 255, 0.82); font-weight: 600; font-size: calc(var(--ly) * 0.8); }
.ln.dots { display: flex; gap: 8px; padding: 14px 0; cursor: default; }
.ln.dots i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.ln.dots.on i { animation: breathe 1.4s ease-in-out infinite; background: #fff; }
.ln.dots.on i:nth-child(2) { animation-delay: 0.2s; }
.ln.dots.on i:nth-child(3) { animation-delay: 0.4s; }
@keyframes breathe { 0%, 100% { opacity: 0.3; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.15); } }
.ly-none { color: rgba(255, 255, 255, 0.7); padding: 30px 4px; text-align: center; }
.big-lyrics { --ly: clamp(30px, 4.2vw, 54px); height: 100%; background: none; border: 0; padding: 10px 6px 50%; }
.upnext { padding: 4px; }
.upnext .row, .view .row.compact { grid-template-columns: 46px minmax(0, 1fr) 36px; }
.upnext .row .ib { opacity: 1; }

/* -- the player bar --------------------------------------------------------------------------- */
.bar-song { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bar-song .names { flex: 0 1 auto; }
.thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--panel-3); flex: none; }
.slot.dock { display: none; }
.bar-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.transport { display: flex; align-items: center; gap: 8px; }
.transport .ib { background: none; }
.transport .ib:hover { background: var(--panel-2); }
.play { width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: #140C1B; display: grid; place-items: center; transition: transform 0.15s; }
.play:hover { transform: scale(1.06); }
.play:active { transform: scale(0.95); }
.play svg { fill: currentColor; stroke: none; }
.play.busy svg { animation: spin 0.9s linear infinite; fill: none; stroke: currentColor; }
.seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.bar-end .ib { background: none; }
.bar-end .ib:hover { background: var(--panel-2); }
input[type="range"] {
  --v: 0%; -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 16px; background: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, #fff var(--v), rgba(255, 255, 255, 0.2) var(--v)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: #fff; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity 0.15s; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]:hover::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--melt-hi) var(--v), rgba(255, 255, 255, 0.2) var(--v)); }
#volume, .bar-end input[type="range"] { flex: 0 0 96px; }

/* -- YouTube's player, laid over the slot that is showing ------------------------------------- */
.stage { position: fixed; z-index: 30; border-radius: calc(var(--r) * 0.75); overflow: hidden; background: #000; }
.stage iframe, .stage #yt { width: 100%; height: 100%; display: block; border: 0; }
.tap { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 8px 14px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.75); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; white-space: nowrap; }

/* -- pop-ups ---------------------------------------------------------------------------------- */
.menu { position: fixed; z-index: 60; min-width: 230px; max-width: 300px; max-height: 70vh; overflow-y: auto; padding: 6px; border-radius: 16px; background: #1D1326; border: 1px solid var(--line); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.9); }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 14.5px; }
.menu button:hover, .menu button:focus-visible { background: var(--panel-3); }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .label { padding: 8px 12px 4px; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.veil { position: fixed; inset: 0; z-index: 70; background: rgba(8, 4, 12, 0.66); backdrop-filter: blur(4px); }
.dialog { position: fixed; z-index: 80; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 32px)); padding: 24px; border-radius: 22px; background: #1D1326; border: 1px solid var(--line); box-shadow: 0 40px 90px -20px #000; }
.dialog h3 { font: 700 20px/1.2 var(--body); }
.dialog p { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.dialog .actions { justify-content: flex-end; }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: 116px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(480px, calc(100% - 28px)); }
.toast { padding: 12px 18px; border-radius: 14px; background: #2A1C36; border: 1px solid var(--line); box-shadow: 0 16px 40px -14px #000; font-size: 14.5px; text-align: center; animation: rise 0.25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* -- recap, mixes, artists ---------------------------------------------------------------------- */
.art.round { border-radius: 50%; }
.badged { position: relative; display: block; }
.badged i { position: absolute; left: 8px; bottom: 18px; padding: 1px 7px; border-radius: 6px; background: var(--melt); color: #fff; font: 700 10px/1.7 var(--body); letter-spacing: 0.08em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: 22px; }
.tile { padding: 18px; border-radius: calc(var(--r) * 0.8); background: var(--panel-2); border: 1px solid var(--line); }
.tile b { display: block; font: 800 34px/1.1 var(--display); letter-spacing: -0.02em; }
.tile span { color: var(--muted); font-size: 13.5px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 180px; padding-top: 4px; }
.week div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.week i { width: 100%; max-width: 46px; min-height: 3px; height: calc((100% - 50px) * var(--h)); border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--melt-hi), var(--melt)); }
.week b { font-size: 12px; font-weight: 600; color: var(--muted); min-height: 16px; }
.week span { font-size: 12.5px; color: var(--muted); }
.ranks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ranks > * { display: grid; grid-template-columns: 22px 46px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--panel-2); text-align: left; color: inherit; }
.ranks > button:hover { background: var(--panel-3); }
.ranks.plain > * { grid-template-columns: 26px minmax(0, 1fr); }
.ranks .n { color: var(--faint); font-weight: 600; text-align: right; }
.hero .art.round { border-radius: 50%; }

/* -- your year in music: a story to tap through ------------------------------------------------ */
.story { position: relative; min-height: calc(100dvh - 250px); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(160deg, var(--c1), var(--c2) 60%, #0C0710); }
.story::before { content: ""; position: absolute; inset: 0; background: rgba(12, 7, 16, 0.4); }
.story .bars { position: relative; z-index: 4; display: flex; gap: 5px; padding: 14px 54px 0 16px; }
.story .bars i { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.28); overflow: hidden; }
.story .bars em { display: block; height: 100%; width: 0; background: #fff; }
.story .bars i.done em { width: 100%; }
.story .bars i.on em { animation: fill 7s linear forwards; }
@keyframes fill { to { width: 100%; } }
.story-x { position: absolute; right: 8px; top: 2px; z-index: 6; color: #fff; }
.slide { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 30px 28px 40px; }
.slide.in { animation: rise 0.45s ease; }
.slide small { font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 13px; opacity: 0.85; }
.slide h2 { font: 800 clamp(24px, 3.6vw, 38px)/1.12 var(--display); }
.slide .huge { font: 800 clamp(76px, 15vw, 160px)/0.95 var(--display); letter-spacing: -0.04em; }
.slide p { color: rgba(255, 255, 255, 0.86); font-size: 16.5px; }
.slide .art.cover { width: min(230px, 48vw); height: min(230px, 48vw); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); }
.slide .art.cover.round { border-radius: 50%; }
.slide ol.top { list-style: none; margin: 8px 0 0; padding: 0; width: min(420px, 100%); display: flex; flex-direction: column; gap: 8px; text-align: left; counter-reset: n; }
.slide ol.top li { display: grid; grid-template-columns: 26px 48px minmax(0, 1fr); gap: 12px; align-items: center; counter-increment: n; }
.slide ol.top li::before { content: counter(n); font-weight: 800; font-size: 20px; text-align: right; }
.slide ol.top.plain { counter-reset: n 1; }
.slide ol.top.plain li { grid-template-columns: 26px minmax(0, 1fr); }
.slide .names span { color: rgba(255, 255, 255, 0.75); }
.slide .parts { width: min(440px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 8px; }
.slide .parts div { display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.slide .parts i { height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.slide .parts em { display: block; height: 100%; background: #fff; border-radius: 10px; }
.slide canvas { width: min(230px, 52vw); height: auto; border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); position: relative; z-index: 5; }
.slide .actions { position: relative; z-index: 5; justify-content: center; }
.story-nav { position: absolute; top: 34px; bottom: 0; width: 30%; z-index: 3; border: 0; background: none; cursor: pointer; }
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }

/* -- Type along -------------------------------------------------------------------------------- */
.game-row { grid-template-columns: 46px minmax(0, 1fr) auto !important; }
.type { margin-top: 26px; }
.type-hud { display: flex; flex-wrap: wrap; gap: 10px 30px; align-items: center; }
.type-hud div b { display: block; font: 800 30px/1.05 var(--display); font-variant-numeric: tabular-nums; }
.type-hud div span { color: var(--muted); font-size: 12.5px; }
.type-hud .pill { margin-left: auto; }
.type-line { margin-top: 36px; min-height: 130px; font: 800 clamp(28px, 4.2vw, 50px)/1.25 var(--display); letter-spacing: -0.01em; cursor: text; overflow-wrap: anywhere; }
.type-line span { color: rgba(255, 255, 255, 0.38); transition: color 0.08s; }
.type-line span.hit { color: #fff; text-shadow: 0 0 18px rgba(255, 255, 255, 0.3); }
.type-line span.missed { color: #FF7B7B; }
.type-line span.cur { color: #fff; box-shadow: 0 3px 0 var(--melt-hi); }
.type-line span.wait { color: var(--muted); font-weight: 600; font-size: 0.55em; }
.type-line.shake { animation: shake 0.18s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.type-next { margin-top: 14px; min-height: 1.3em; color: rgba(255, 255, 255, 0.3); font: 700 clamp(17px, 2.2vw, 24px)/1.3 var(--display); }
.type-pad { position: absolute; left: -200px; width: 1px; height: 1px; opacity: 0; }
.type-tip { margin-top: 26px; }
.results { text-align: center; }
.results .tiles { text-align: left; }
.results .actions { justify-content: center; }
.grade { font: 800 110px/1 var(--display); color: var(--melt-hi); text-shadow: 0 0 40px var(--melt-glow); }
.sheet-tools { display: none; }

/* -- a little motion: screens ease in, and bars dance on the song that is playing --------------- */
.view.enter > * { animation: rise 0.3s ease both; }
.view.enter > *:nth-child(2) { animation-delay: 0.04s; }
.view.enter > *:nth-child(3) { animation-delay: 0.08s; }
.view.enter > *:nth-child(n + 4) { animation-delay: 0.12s; }
body[data-reduce="1"] .view.enter > * { animation: none; }
.app.playing .row.is-current .n { position: relative; color: transparent; }
.app.playing .row.is-current .n::before {
  content: ""; position: absolute; right: 3px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(var(--melt-hi), var(--melt-hi)) 0 100% / 3px 60% no-repeat,
    linear-gradient(var(--melt-hi), var(--melt-hi)) 50% 100% / 3px 100% no-repeat,
    linear-gradient(var(--melt-hi), var(--melt-hi)) 100% 100% / 3px 40% no-repeat;
  animation: bars 0.7s ease-in-out infinite alternate;
}
@keyframes bars { to { background-size: 3px 100%, 3px 35%, 3px 90%; } }

/* -- looks: the spinning-record cover, and a calmer page for slower devices -------------------- */
body[data-cover="vinyl"] .thumb { border-radius: 50%; animation: turn 8s linear infinite; animation-play-state: paused; }
body[data-cover="vinyl"] .app.playing .thumb { animation-play-state: running; }
body[data-reduce="1"] .side, body[data-reduce="1"] .view, body[data-reduce="1"] .now, body[data-reduce="1"] .bar { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* -- narrow screens: one column, tabs at the bottom, now playing as a sheet ------------------- */
@media (max-width: 999px) {
  .app { grid-template: "top" auto "view" minmax(0, 1fr) "bar" auto "tabs" auto / minmax(0, 1fr); gap: 8px; padding: 8px 8px calc(6px + env(safe-area-inset-bottom)); }
  .side, .hist, .ib.home, .tools .get, .bar-end, .bar .thumb, .bar #shuffle, .bar [data-act="shuffle"], .bar [data-act="repeat"], .bar [data-act="prev"], .bar .seek span { display: none; }
  .brand { width: auto; }
  .brand span { display: none; }
  .view { padding: 20px 16px 30px; border-radius: 20px; }
  .bar { grid-template: "dock names names" auto "dock like transport" 1fr / auto auto minmax(0, 1fr); gap: 2px 12px; padding: 8px 12px 12px 8px; border-radius: 20px; position: relative; align-items: center; }
  .bar-song, .bar-mid { display: contents; }
  .slot.dock { display: block; grid-area: dock; width: min(200px, 48vw); border-radius: 12px; }
  .bar #bar-names { grid-area: names; align-self: end; padding-top: 4px; cursor: pointer; }
  .bar #bar-names b { font-size: 15px; }
  .bar [data-act="like"] { grid-area: like; justify-self: start; margin-left: -8px; }
  .bar .transport { grid-area: transport; justify-self: end; gap: 4px; }
  .bar .seek { position: absolute; left: 14px; right: 14px; bottom: -3px; width: auto; max-width: none; }
  .bar .seek input { height: 8px; pointer-events: none; }
  .bar .transport .ib, .bar .play { width: 44px; height: 44px; }
  .tools a[href="#/together"], .tools a[href="#/games"], .tools a[href="#/recap"] { display: none; }
  .sheet-tools { display: flex; justify-content: center; gap: 12px; }
  .story { min-height: calc(100dvh - 300px); }
  .app.idle .bar { display: none; }
  .tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(4, 1fr); }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 2px; color: var(--muted); font-size: 11.5px; font-weight: 500; border-radius: 12px; }
  .tabs a.is-here { color: var(--text); }
  .tabs a.is-here svg { color: var(--melt-hi); }
  .now { position: fixed; inset: 0; z-index: 20; border-radius: 0; border: 0; background: rgba(14, 8, 19, 0.9); padding: calc(10px + env(safe-area-inset-top)) 16px calc(14px + env(safe-area-inset-bottom));
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s; }
  .app.sheet .now { opacity: 1; visibility: visible; }
  .app.sheet .slot.dock { visibility: hidden; }
  .now-head { display: flex; }
  .now-head b { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sheet-controls { display: flex; flex-direction: column; align-items: center; gap: 6px; }
  .sheet-controls .seek { max-width: none; }
  .sheet-controls .play { width: 62px; height: 62px; }
  .sheet-controls .play svg { width: 28px; height: 28px; }
  .sheet-controls .transport { gap: 14px; }
  #now-tabs { display: inline-flex; align-self: center; }
  .row { grid-template-columns: 46px minmax(0, 1fr) 36px 36px; padding: 6px 4px; }
  .row .n, .row .album, .row .dur { display: none; }
  .row .ib { opacity: 1; }
  .hero { gap: 16px; }
  .hero .art { width: 132px; height: 132px; border-radius: 18px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .quick button { grid-template-columns: 48px minmax(0, 1fr); }
  .quick .art { width: 48px; height: 48px; }
  .toasts { bottom: calc(210px + env(safe-area-inset-bottom)); }
  .stage { border-radius: 12px; }
  .app.sheet ~ .stage { border-radius: 16px; z-index: 30; }
  .big-lyrics { --ly: 30px; }
}
@media (min-width: 1000px) and (max-width: 1279px) {
  .app { grid-template-columns: 232px minmax(0, 1fr) 300px; }
  .brand { width: 118px; }
  .view { padding: 24px 20px 36px; }
  .bar { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) auto; gap: 12px; }
  .bar-end { gap: 2px; }
  .bar-end a[href="#/lyrics"] { display: none; }
  .bar-end input[type="range"] { flex-basis: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
