/* Layout: one phone-width column of blush glass tiles, ivory lace trim, a wide player card in the middle, pearls and ribbons as the only ornament. */
:root {
  --bg-a: #ffeef3;
  --bg-b: #f9d9e3;
  --bg-c: #fdf1f4;
  --ink: #6a3446;
  --ink-2: rgba(106,52,70,.68);
  --ink-3: rgba(106,52,70,.42);
  --glass: rgba(255,255,255,.55);
  --glass-hi: rgba(255,255,255,.82);
  --edge: rgba(232,150,176,.55);
  --shadow: rgba(214,120,152,.22);
  --solid: #fffdfd;
  --solid-ink: #6a3446;
  --solid-ink-2: #b48a98;
  --pink: #ee8fae;
  --pink-ink: #d9648d;
  --rose: #e87c9f;
  --fill-a: #fbd3df;
  --fill-b: #f09ab7;
  --track: rgba(217,100,141,.2);
  --sheet: rgba(255,247,249,.92);
  --font-body: 'Quicksand', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --font-script: 'Pinyon Script', 'Snell Roundhand', cursive;
  color-scheme: light;
}
:root[data-palette="lilac"] { --bg-a:#f3ebfd; --bg-b:#ded2f4; --bg-c:#f7f2fd; --ink:#4f3b70; --ink-2:rgba(79,59,112,.68); --ink-3:rgba(79,59,112,.42); --edge:rgba(172,142,228,.55); --shadow:rgba(150,120,210,.22); --solid-ink:#4f3b70; --solid-ink-2:#9d8cbb; --pink:#b99be8; --pink-ink:#8f62d3; --rose:#a37ae0; --fill-a:#e3d6f8; --fill-b:#b99be8; --track:rgba(143,98,211,.2); --sheet:rgba(250,246,255,.92); }
:root[data-palette="champagne"] { --bg-a:#fff3e8; --bg-b:#f6dfcb; --bg-c:#fff7ef; --ink:#6d4636; --ink-2:rgba(109,70,54,.68); --ink-3:rgba(109,70,54,.42); --edge:rgba(228,165,130,.55); --shadow:rgba(210,140,100,.22); --solid-ink:#6d4636; --solid-ink-2:#b99580; --pink:#f0a47f; --pink-ink:#d77a50; --rose:#e58f66; --fill-a:#fadcc8; --fill-b:#f0a47f; --track:rgba(215,122,80,.2); --sheet:rgba(255,248,242,.92); }
:root[data-palette="sage"] { --bg-a:#edf5ea; --bg-b:#d4e6d0; --bg-c:#f4f9f2; --ink:#3f5a46; --ink-2:rgba(63,90,70,.68); --ink-3:rgba(63,90,70,.42); --edge:rgba(128,184,140,.55); --shadow:rgba(100,160,115,.22); --solid-ink:#3f5a46; --solid-ink-2:#8fa896; --pink:#8fc79a; --pink-ink:#5aa06a; --rose:#6fb27c; --fill-a:#d6ebd9; --fill-b:#8fc79a; --track:rgba(90,160,106,.2); --sheet:rgba(247,252,246,.92); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; }
body {
  background:
    radial-gradient(120% 60% at 90% 0%, var(--bg-a) 0%, transparent 62%),
    radial-gradient(90% 55% at 0% 100%, var(--bg-c) 0%, transparent 65%),
    var(--bg-b);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  padding-block: 14px 28px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
  transition: background-color .6s;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--pink-ink); outline-offset: 3px; }
.ic { width: 100%; height: 100%; display: block; }

/* ambient glow from the cover art */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient img { position: absolute; inset: -20%; width: 140%; height: 140%; object-fit: cover; filter: blur(80px) saturate(1.2); opacity: .32; }
.drop .ambient::after { content: ""; position: absolute; inset: 10px; border: 2px dashed var(--pink-ink); border-radius: 36px; }

.deck { position: relative; z-index: 1; max-width: 430px; margin-inline: auto; display: grid; gap: 14px; }

.top { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 6px 2px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--pink); }
.brand .ic { width: 22px; height: 22px; }
.mark { font-family: var(--font-script); font-size: 36px; line-height: 1; color: var(--pink-ink); letter-spacing: .01em; }
.status { color: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.pearls { width: 100%; max-width: 260px; height: 8px; background: radial-gradient(circle at 4px 4px, #fff 0 2.4px, rgba(238,143,174,.55) 3px 3.6px, transparent 4px) 0 0 / 14px 8px repeat-x; filter: drop-shadow(0 1px 1px rgba(214,120,152,.25)); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto auto minmax(78px, auto) minmax(78px, auto) auto; gap: 14px; }

.glass {
  background: var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 26px var(--shadow);
}

/* round buttons */
.orb {
  aspect-ratio: 1; width: 100%; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: var(--glass); border: 1px solid var(--edge); color: var(--pink-ink);
  -webkit-backdrop-filter: blur(22px) saturate(1.4); backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 10px 26px var(--shadow);
  transition: background .25s, color .25s, transform .15s;
}
.orb::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px dotted var(--edge); pointer-events: none; }
.orb:active, .pill:active { transform: scale(.94); }
.orb .ic { width: 46%; height: 46%; }
.orb.on, .orb.armed { background: var(--rose); color: #fff; border-color: transparent; }
.orb.on::after, .orb.armed::after { border-color: rgba(255,255,255,.55); }
.badge { position: absolute; right: 22%; top: 20%; font-size: 11px; font-weight: 700; color: #fff; }
#bShuffle { grid-area: 1 / 1; } #bRepeat { grid-area: 1 / 2; } #bLike { grid-area: 2 / 1; } #bMute { grid-area: 2 / 2; }
#bAdd { grid-area: 6 / 1; } #bSun { grid-area: 6 / 2; } #bTheme { grid-area: 6 / 3; } #bClear { grid-area: 6 / 4; }

.eq { display: flex; align-items: flex-end; gap: 4px; height: 40%; }
.eq span { width: 5px; height: 100%; border-radius: 3px; background: currentColor; transform-origin: bottom; transform: scaleY(var(--h)); }
.eq span:nth-child(1) { --h: .35; } .eq span:nth-child(2) { --h: .6; } .eq span:nth-child(3) { --h: .8; } .eq span:nth-child(4) { --h: 1; }
.eq.live span { animation: bounce 1s ease-in-out infinite alternate; }
.eq.live span:nth-child(2) { animation-duration: .8s; animation-delay: -.3s; }
.eq.live span:nth-child(3) { animation-duration: 1.2s; animation-delay: -.6s; }
.eq.live span:nth-child(4) { animation-duration: .9s; animation-delay: -.1s; }
@keyframes bounce { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* up next tile with a lace scallop */
.np {
  grid-area: 1 / 3 / 3 / 5; background: var(--solid); color: var(--solid-ink); border-radius: 30px 30px 8px 8px; padding: 18px 18px 18px;
  display: flex; flex-direction: column; justify-content: space-between; min-width: 0; position: relative;
  border: 1px solid var(--edge); box-shadow: 0 10px 26px var(--shadow); margin-bottom: 7px;
}
.np::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -8px; height: 8px; background: radial-gradient(circle at 50% -1px, var(--solid) 0 6px, var(--edge) 6.5px 7.5px, transparent 8px) 0 0 / 14px 8px repeat-x; filter: drop-shadow(0 4px 3px var(--shadow)); }
.np .ic { width: 38px; height: 38px; color: var(--pink); }
.np small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--pink-ink); margin-bottom: 4px; }
.np b { display: block; font-family: var(--font-display); font-size: 23px; line-height: 1.05; font-weight: 600; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np span { display: block; font-size: 14px; color: var(--solid-ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* player */
.player { grid-area: 3 / 1 / 4 / 5; border-radius: 34px; padding: 14px; display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 14px; position: relative; }
.player::before { content: ""; position: absolute; inset: 5px; border-radius: 29px; border: 1px dotted var(--edge); pointer-events: none; }
.art {
  aspect-ratio: 1; border-radius: 50% 50% 18px 18px / 36% 36% 18px 18px; overflow: hidden; position: relative; align-self: start; width: 100%;
  background:
    radial-gradient(90% 70% at 30% 20%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(80% 80% at 80% 90%, var(--pink), transparent 70%),
    linear-gradient(160deg, #fff, var(--fill-a));
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--edge), 0 8px 20px var(--shadow);
}
.art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.95); }
.art .ph .ic { width: 38%; height: 38%; }
.ribbon { position: absolute; left: -4px; top: -5px; width: 34px; height: 34px; color: var(--rose); filter: drop-shadow(0 2px 3px var(--shadow)); z-index: 2; pointer-events: none; }
.artwrap { position: relative; align-self: start; }
.meta { min-width: 0; display: flex; flex-direction: column; }
.title { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 30px; line-height: 1; margin: 2px 0 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: balance; color: var(--ink); }
.artist { color: var(--ink-2); font-size: 14px; font-weight: 600; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta { align-self: flex-start; margin-top: 8px; background: var(--rose); color: #fff; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 99px; box-shadow: 0 6px 14px var(--shadow); }
.ctrls { display: flex; align-items: center; justify-content: space-between; margin: auto 0 6px; padding: 0 4px; color: var(--pink-ink); }
.ctrls button { width: 38px; height: 38px; display: grid; place-items: center; transition: transform .15s, opacity .2s; }
.ctrls button:active { transform: scale(.88); }
.ctrls #bPlay { width: 52px; height: 52px; border-radius: 50%; background: var(--rose); color: #fff; box-shadow: 0 8px 18px var(--shadow); }
.ctrls #bPlay .ic { width: 22px; height: 22px; margin: auto; }
.ctrls #bPrev .ic, .ctrls #bNext .ic { width: 26px; height: 26px; margin: auto; }
.scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; background: transparent; margin: 0; --p: 0%; touch-action: pan-y; }
.scrub::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--rose) var(--p), var(--track) var(--p)); }
.scrub::-moz-range-track { height: 6px; border-radius: 6px; background: var(--track); }
.scrub::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--rose); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4px; border-radius: 50%; background: #fff; border: 2px solid var(--rose); box-shadow: 0 1px 4px var(--shadow); }
.scrub::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--rose); }
.times { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* vertical sliders */
.vs { grid-row: 4 / 6; border-radius: 40px; position: relative; overflow: hidden; touch-action: none; cursor: ns-resize; --v: 50%; min-height: 170px; }
#volS { grid-column: 1; } #spdS { grid-column: 2; }
.vs-fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); background: linear-gradient(180deg, var(--fill-a), var(--fill-b)); transition: height .08s; }
.vs .ic { position: absolute; left: 50%; bottom: 14px; width: 28px; height: 28px; transform: translateX(-50%); color: var(--ink); }
.vs-val { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.vs-cap { position: absolute; top: 34px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }

/* pills */
.pill { grid-column: 3 / 5; border-radius: 40px; display: flex; align-items: center; gap: 12px; padding: 0 18px; min-width: 0; transition: transform .15s, background .25s; text-align: left; }
#bQueue { grid-row: 4; background: var(--solid); color: var(--solid-ink); border: 1px solid var(--edge); box-shadow: 0 10px 26px var(--shadow); justify-content: space-between; }
#bQueue .deco { color: var(--pink); font-size: 19px; letter-spacing: .02em; white-space: nowrap; }
#bQueue .qt { display: grid; line-height: 1.15; text-align: right; min-width: 0; }
#bQueue .qt b { font-family: var(--font-display); font-style: italic; font-size: 20px; font-weight: 600; }
#bQueue .qt span { font-size: 12px; color: var(--solid-ink-2); font-weight: 700; }
#bSleep { grid-row: 5; }
#bSleep.on { background: var(--glass-hi); }
#bSleep .moon { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--glass-hi); border: 1px solid var(--edge); display: grid; place-items: center; color: var(--pink-ink); }
#bSleep.on .moon { background: var(--rose); color: #fff; border-color: transparent; }
#bSleep .moon .ic { width: 22px; height: 22px; }
#bSleep .lbl { font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 21px; flex: 1; min-width: 0; white-space: nowrap; }
#bSleep .chev { width: 18px; height: 18px; flex: none; color: var(--ink-3); }

/* queue sheet */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(106,52,70,.28); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s; }
.sheet {
  width: min(100%, 460px); max-height: 74dvh; overflow: auto; background: var(--sheet); border: 1px solid var(--edge); border-bottom: 0;
  -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4);
  border-radius: 34px 34px 0 0; padding: 10px 14px calc(20px + env(safe-area-inset-bottom, 0px)); animation: rise .3s cubic-bezier(.2,.8,.2,1);
}
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--track); margin: 0 auto 10px; }
.sheet h2 { font-family: var(--font-script); font-weight: 400; font-size: 34px; margin: 2px 8px 8px; color: var(--pink-ink); text-align: center; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 20px; }
.row.cur { background: #fff; box-shadow: 0 0 0 1px var(--edge); }
.row .go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.thumb { width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden; position: relative; background: linear-gradient(150deg, #fff, var(--fill-b)); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--edge); display: grid; place-items: center; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .ic { width: 20px; height: 20px; color: #fff; }
.row .tx { min-width: 0; }
.row .tx b { display: block; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .tx span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .rm { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-3); flex: none; }
.row .rm .ic { width: 16px; height: 16px; }
.row .heart { width: 16px; height: 16px; color: var(--pink); flex: none; }
.empty { text-align: center; color: var(--ink-2); padding: 26px 10px 14px; line-height: 1.5; font-weight: 600; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 30; background: var(--solid); color: var(--solid-ink); border: 1px solid var(--edge); font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 99px; pointer-events: none; transition: .3s; box-shadow: 0 10px 26px var(--shadow); max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.hint { text-align: center; color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; padding-top: 4px; }

@media (max-width: 360px) {
  .title { font-size: 26px; }
  .np b { font-size: 20px; }
  #bQueue .deco { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* standalone resets */
[hidden] { display: none !important; }
body { margin: 0; }
img { max-width: 100%; }
