/* Everplay in the browser — made for the iPhone first (safe areas, thumbs, the home screen), fine on others. */

@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #101114; --surface: #1a1c20; --surface-hi: #23262b; --text: #e8e4dd; --dim: #a19e98; --faint: #6e6d6a;
  --accent: #9fb5a8; --accent2: #4a5d6e; --on-accent: #15161a;
  --line: rgba(255, 255, 255, .07);
  --nav: 58px; --mini: 64px;
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="midnight"] { --bg: #000; --surface: #0f1013; --surface-hi: #191a1f; --text: #ececf1; --dim: #9c9ca6; --faint: #62626b; --accent: #8fa8d8; --accent2: #2f3c63; --on-accent: #0b0d14; }
[data-theme="sunset"] { --bg: #15100f; --surface: #211917; --surface-hi: #2c211e; --text: #f1e6dc; --dim: #b39f93; --faint: #7a6960; --accent: #e0a27c; --accent2: #6b3b44; --on-accent: #1c120f; }
[data-theme="cat"] { --bg: #110914; --surface: #1d1121; --surface-hi: #2a172f; --text: #fbeaf6; --dim: #c9a3c2; --faint: #8a6a86; --accent: #ff7ad6; --accent2: #8a3fd0; --on-accent: #2a0a23; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.45 "Inter", -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; display: block; }
img { display: block; }

.boot { position: fixed; inset: 0; display: flex; gap: 6px; align-items: center; justify-content: center; }
.boot span { width: 8px; height: 30px; border-radius: 8px; background: var(--text); animation: eq 1s infinite ease-in-out; }
.boot span:nth-child(2) { height: 44px; animation-delay: -.3s; } .boot span:nth-child(3) { height: 36px; animation-delay: -.6s; }
.boot span:nth-child(4) { height: 18px; animation-delay: -.8s; }
@keyframes eq { 50% { transform: scaleY(.4); } }

/* ---- layout ---- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.page {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--top) + 18px) 18px calc(var(--nav) + var(--bottom) + var(--mini) + 28px);
  background: radial-gradient(120% 50% at 80% 0%, color-mix(in srgb, var(--accent2) 45%, transparent), transparent 70%);
}
.page.no-mini { padding-bottom: calc(var(--nav) + var(--bottom) + 24px); }
.wrap { max-width: 640px; margin: 0 auto; }
h1 { font-size: 34px; letter-spacing: -.035em; font-weight: 800; margin: 6px 0 4px; }
h2 { font-size: 21px; letter-spacing: -.02em; font-weight: 750; margin: 26px 0 12px; }
.sub { color: var(--dim); margin: 0 0 18px; font-size: 15px; }
.muted { color: var(--faint); font-size: 14px; }

/* bottom navigation */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--nav) + var(--bottom)); padding-bottom: var(--bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.nav button { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; }
.nav button.on { color: var(--text); }
.nav button.on svg { color: var(--accent); }

/* mini player */
.mini {
  position: fixed; left: 8px; right: 8px; bottom: calc(var(--nav) + var(--bottom) + 6px); z-index: 19; height: var(--mini);
  display: grid; grid-template-columns: 48px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px;
  border-radius: 16px; background: color-mix(in srgb, var(--surface-hi) 88%, transparent);
  backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); overflow: hidden; max-width: 640px; margin: 0 auto;
}
.mini .cover { width: 48px; height: 48px; border-radius: 10px; }
.mini .t { min-width: 0; }
.mini .t b, .row .t b { display: block; font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .t span, .row .t span { display: block; font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.mini .prog { position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.mini .prog i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 2px; }

/* covers */
.cover { background: var(--surface-hi); object-fit: cover; flex: none; }
.cover.ph { background: linear-gradient(135deg, var(--accent), var(--accent2)); }

/* track rows */
.list { display: grid; gap: 2px; }
.row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 7px 6px; border-radius: 12px; text-align: left; width: 100%; }
.row:active { background: var(--surface); }
.row .cover { width: 52px; height: 52px; border-radius: 9px; }
.row.playing .t b { color: var(--accent); }
.row .t, .meta > span, .actions .head > span { min-width: 0; }
.row .more { width: 36px; height: 36px; display: grid; place-items: center; color: var(--faint); }
.row .dur { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 0 4px; margin-right: 5px; }

/* search */
.search { position: sticky; top: calc(var(--top) * -1 - 18px); z-index: 2; padding: 6px 0 10px; margin: -6px 0 6px;
          background: linear-gradient(var(--bg) 70%, transparent); }
.field { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px; background: var(--surface-hi); color: var(--faint); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 17px; }
.field input::placeholder { color: var(--faint); }

/* cards and tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; align-items: center; gap: 12px; height: 58px; border-radius: 13px; background: var(--surface); overflow: hidden; font-weight: 650; font-size: 14.5px; text-align: left; }
.tile .ico { width: 58px; height: 58px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.shelf { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.card { flex: 0 0 140px; scroll-snap-align: start; text-align: left; }
.card .cover { width: 140px; height: 140px; border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.card b { display: block; margin-top: 8px; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .mosaic { width: 140px; height: 140px; border-radius: 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.skel .card b, .skel .card > span:not(.cover) { height: 12px; margin-top: 10px; border-radius: 6px; background: var(--surface); width: 80%; }
.skel .card > span:not(.cover) { width: 55%; margin-top: 6px; }
.skel h2 { width: 160px; height: 22px; border-radius: 8px; background: var(--surface); }
.skel .cover, .skel b, .skel h2, .skel .card > span { animation: skel 1.2s ease-in-out infinite alternate; }
@keyframes skel { from { opacity: .45; } to { opacity: .9; } }
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat-tiles div { padding: 14px 16px; border-radius: 14px; background: var(--surface); }
.stat-tiles b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat-tiles span { color: var(--dim); font-size: 13px; }
.card.artist .cover { border-radius: 50%; }
.row.ranked { grid-template-columns: 22px 52px 1fr auto; }
.row .rank { color: var(--faint); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.hours { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 0 2px; }
.hours i { flex: 1; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent)); }
.hours-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stats-note { margin-top: 26px; font-size: 13px; }
.card span { display: block; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 40px 10px; text-align: center; color: var(--faint); }
.empty svg { width: 42px; height: 42px; margin: 0 auto 10px; opacity: .6; }

.btn-primary { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 650; }
.btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--surface-hi); font-weight: 600; font-size: 14.5px; }

/* settings */
.group { border-radius: 16px; background: var(--surface); overflow: hidden; }
.item { display: flex; align-items: center; gap: 14px; min-height: 54px; padding: 10px 16px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .grow small { display: block; color: var(--faint); font-size: 13px; }
.swatches { display: flex; gap: 10px; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .15); }
.swatches button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.sw-nokturn { background: linear-gradient(135deg, #b3c6bb, #3f5061); } .sw-midnight { background: linear-gradient(135deg, #8fa8d8, #000); }
.sw-sunset { background: linear-gradient(135deg, #e0a27c, #6b3b44); } .sw-cat { background: linear-gradient(135deg, #ff7ad6, #8a3fd0); }

/* install hint (iPhone, in Safari) */
.install { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; margin: 4px 0 6px;
           background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 14px; }
.install svg { color: var(--accent); }

/* ---- full-screen player ---- */
.sheet {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column;
  padding: calc(var(--top) + 10px) 24px calc(var(--bottom) + 18px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent2) 70%, var(--bg)) 0%, var(--bg) 65%);
  transform: translate(var(--dragx, 0px), var(--drag, 0px)); transition: transform .38s var(--ease);
  touch-action: none;
}
.sheet.dragging { transition: none; }
.sheet.closed { transform: translateY(105%); pointer-events: none; }
.grab { width: 40px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .3); margin: 0 auto 6px; }
.sheet-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; font-size: 12px; color: var(--dim); }
.sheet-top b { display: block; color: var(--text); font-size: 13px; }
.sheet-top button { width: 44px; height: 44px; display: grid; place-items: center; }
.sheet-body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; min-height: 0; max-width: 520px; width: 100%; margin: 0 auto; }
.big-cover { width: min(100%, 46vh); aspect-ratio: 1; margin: 0 auto; border-radius: 18px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5);
             transition: transform .4s var(--ease); }
.big-cover.paused { transform: scale(.88); }
.meta { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.meta b { display: block; font-size: 22px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta > span > span { display: block; color: var(--dim); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like { width: 44px; height: 44px; display: grid; place-items: center; color: var(--dim); }
.like.on { color: var(--accent); }
.seek { position: relative; height: 26px; touch-action: none; }
.seek .bar { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.seek .bar i { display: block; height: 100%; border-radius: 4px; background: var(--text); }
.seek .knob { position: absolute; top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--text); }
.times { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; margin-top: -10px; }
.controls { display: flex; align-items: center; justify-content: space-between; }
.controls button { width: 54px; height: 54px; display: grid; place-items: center; color: var(--text); }
.controls .side { color: var(--dim); }
.controls .side.on { color: var(--accent); }
.controls svg { width: 30px; height: 30px; }
.controls .play { width: 74px; height: 74px; border-radius: 50%; background: var(--text); color: var(--bg); }
.controls .play svg { width: 34px; height: 34px; }
.sheet-tabs { display: flex; justify-content: center; gap: 10px; }
.sheet-tabs button { height: 36px; padding: 0 14px; border-radius: 999px; color: var(--dim); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sheet-tabs button.on { background: rgba(255, 255, 255, .1); color: var(--text); }
/* "Up next" under the controls and the queue drawer it opens */
.upnext { display: grid; grid-template-columns: 40px 1fr 24px; gap: 12px; align-items: center; width: 100%; padding: 8px 12px 8px 8px;
          border-radius: 14px; background: rgba(255, 255, 255, .07); text-align: left; color: var(--text); touch-action: none; }
.upnext:active { background: rgba(255, 255, 255, .12); }
.upnext .cover { width: 40px; height: 40px; border-radius: 8px; }
.upnext .ico-cover { display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: var(--dim); }
.upnext .ico-cover svg { width: 20px; height: 20px; }
.upnext .t { min-width: 0; }
.upnext small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.upnext b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext .t > span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext > svg { width: 24px; height: 24px; color: var(--dim); }
.qwrap { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.qwrap.on { pointer-events: auto; touch-action: none; }
.qscrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .38s var(--ease); }
.qwrap.on .qscrim { opacity: 1; }
.qdrawer { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; height: 58%;
           display: flex; flex-direction: column; padding: 8px 18px calc(var(--bottom) + 8px); border-radius: 22px 22px 0 0;
           background: color-mix(in srgb, var(--accent2) 22%, var(--bg)); box-shadow: 0 -18px 50px rgba(0, 0, 0, .5);
           transform: translate(var(--dragx, 0px), 105%); transition: transform .38s var(--ease), height .38s var(--ease); touch-action: none; }
.qdrawer.half, .qdrawer.full { transform: translate(var(--dragx, 0px), 0); }
.qdrawer.full { height: calc(100% - var(--top) - 6px); }
.qdrawer:not(.half):not(.full) { pointer-events: none; }
.qdrawer.dragging { transition: none; }
.qd-head { padding-bottom: 6px; cursor: grab; }
.qd-title { display: grid; grid-template-columns: 1fr 44px 44px 44px; align-items: center; }
.qd-title b { display: block; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.qd-title > span > span { display: block; font-size: 13px; color: var(--dim); }
.qd-title button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); }
.qd-title button.loading { opacity: .5; }
.qd-label { margin: 14px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-label span { text-transform: none; letter-spacing: 0; color: var(--dim); }
.qd-more { text-align: center; color: var(--faint); font-size: 13px; margin: 10px 0 0; }
.qdrawer .panel { padding-bottom: 12px; }
.panel { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -8px; padding: 0 8px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.lyrics { padding: 10px 0 40vh; }
.lyrics p { margin: 0 0 14px; font-size: 24px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; color: color-mix(in srgb, var(--text) 35%, transparent); transition: color .3s; }
.lyrics p.on { color: var(--text); }
.lyrics.plain p { color: var(--text); font-size: 19px; font-weight: 600; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); border-top-color: var(--text); animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.play.loading svg { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* action sheet and toast */
.backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .5); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.actions { position: fixed; left: 8px; right: 8px; bottom: calc(var(--bottom) + 8px); z-index: 51; border-radius: 18px; background: var(--surface-hi); overflow: hidden;
           max-width: 520px; margin: 0 auto; animation: up .3s var(--ease); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.actions .head { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.actions .head .cover { width: 48px; height: 48px; border-radius: 9px; }
.actions .head b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions .head span { color: var(--dim); font-size: 13px; }
.actions button { display: flex; align-items: center; gap: 14px; width: 100%; height: 52px; padding: 0 18px; font-size: 16px; text-align: left; }
.actions button:active { background: rgba(255, 255, 255, .06); }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + var(--bottom) + var(--mini) + 20px); z-index: 60; transform: translateX(-50%);
         padding: 10px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; white-space: nowrap;
         animation: up .3s var(--ease); }

@media (min-width: 700px) {
  .page { padding-left: 32px; padding-right: 32px; }
  .mini { left: 50%; right: auto; width: 620px; transform: translateX(-50%); }
}
.noscript { padding: 30px; text-align: center; }
.lib-tabs { justify-content: flex-start; margin: 4px 0 14px; }
.item input.name { width: 50%; text-align: right; border: 0; outline: 0; background: none; color: var(--dim); font-size: 16px; -webkit-user-select: text; user-select: text; }
.field input { -webkit-user-select: text; user-select: text; }
a.item { color: inherit; text-decoration: none; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; }
.row .mosaic { width: 52px; height: 52px; border-radius: 9px; }
.pl-list { margin-top: 14px; }
.back { display: flex; align-items: center; gap: 2px; color: var(--accent); font-weight: 600; margin: -4px 0 8px -6px; height: 36px; }
.pl-head { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; margin-bottom: 14px; }
.pl-head h1 { font-size: 26px; overflow-wrap: anywhere; }
.pl-cover { width: 112px; height: 112px; border-radius: 14px; box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.btn-primary[disabled] { opacity: .45; }
.group.danger { margin-top: 26px; }
.group.danger .item { color: #e08a8a; }
.pick-list { max-height: 45vh; overflow-y: auto; }
.prompt { padding: 18px; display: grid; gap: 12px; }
.prompt b { font-size: 17px; }
.prompt p { margin: 0; }
.prompt input { height: 48px; border-radius: 12px; border: 0; outline: 0; padding: 0 14px; background: var(--surface); color: var(--text); font-size: 17px;
                -webkit-user-select: text; user-select: text; }
.prompt .btn-primary, .prompt .btn-ghost { justify-content: center; height: 46px; width: 100%; }
.pair-code { font-size: 24px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--accent); -webkit-user-select: text; user-select: text; }
.item .btn-ghost { height: 34px; padding: 0 12px; font-size: 13.5px; white-space: nowrap; }

/* ---- together: rooms and the link pages ---- */
.wide { width: 100%; justify-content: center; margin-top: 14px; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.join-row .field input { width: 100%; text-transform: uppercase; letter-spacing: .08em; }
.join-row .btn-primary { height: 48px; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.mode { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-hi); text-align: left; box-shadow: inset 0 0 0 1.5px transparent; }
.mode b { font-size: 14.5px; }
.mode small { color: var(--faint); font-size: 12.5px; line-height: 1.3; }
.mode.on { box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-hi)); }
.invite { text-align: center; padding-top: 4vh; }
.invite h1 { font-size: 30px; overflow-wrap: anywhere; }
.invite .muted { margin: 18px 0 0; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; }
.invite p.muted:not(:first-of-type) { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; }
.invite-cover { width: min(64vw, 260px); height: min(64vw, 260px); border-radius: 20px; margin: 0 auto; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }
.ico-cover { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--on-accent); }
.ico-cover svg { width: 72px; height: 72px; }
.invite-now { display: grid; gap: 2px; margin: 0 auto 6px; padding: 12px 16px; border-radius: 14px; background: var(--surface); max-width: 420px; font-size: 12px; color: var(--faint); }
.invite-now b { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-now span { font-size: 14px; color: var(--dim); }
.room-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.room-head h1 { overflow-wrap: anywhere; }
.room-head .sub { margin-bottom: 14px; }
.room-code { color: var(--accent); letter-spacing: .1em; -webkit-user-select: text; user-select: text; }
.live-dot { width: 12px; height: 12px; margin-top: 21px; border-radius: 50%; background: #e0605a; box-shadow: 0 0 0 0 rgba(224, 96, 90, .6); animation: live 1.8s infinite; }
.live-dot.off { background: var(--faint); animation: none; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(224, 96, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 96, 90, 0); } }
.banner { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; width: 100%; padding: 14px; margin-bottom: 12px; border-radius: 16px; text-align: left;
          background: var(--accent); color: var(--on-accent); font-size: 14px; animation: up .3s var(--ease); }
.banner b { display: block; font-size: 16px; }
.banner small { display: block; opacity: .75; }
.now { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--surface); }
.now-cover { width: 72px; height: 72px; border-radius: 12px; transition: transform .4s var(--ease); transform: scale(.94); }
.now-cover.on { transform: none; }
.now .t { min-width: 0; }
.now .t b { display: block; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .t > span { display: block; color: var(--dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .t small { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--faint); font-size: 12.5px; }
.now .t small svg { width: 14px; height: 14px; }
.now .btn { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); }
.now .btn.loading svg { animation: pulse 1s infinite; }
.member .more { width: 36px; height: 36px; display: grid; place-items: center; color: var(--faint); }
.avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 750;
          background: linear-gradient(135deg, var(--accent), var(--accent2)); color: var(--on-accent); }
.avatar.away { filter: grayscale(1); opacity: .5; }
.actions .head .avatar { width: 48px; height: 48px; }

/* copies of YouTube Music playlists */
.pl-group { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-top: 24px; }
.yt-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3d3d; flex: none; display: inline-block; }
.mirror-note { display: flex; gap: 8px; align-items: baseline; margin: 0 0 4px; }

/* playlist passwords */
.invite .field.pw { margin: 16px auto 0; max-width: 420px; }
.field.pw input { -webkit-user-select: text; user-select: text; }
.pw-group { margin-top: 26px; }
.pw-group .item svg { color: var(--accent); }

/* folders */
.pl-group small { color: var(--faint); font-weight: 600; font-size: 13px; margin-left: 2px; }
.pl-group svg { width: 18px; height: 18px; color: var(--faint); }
.pl-edit { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; color: var(--faint); }
.pl-section.dim { opacity: .6; }
.yt-dot.sp { background: #1db954; }
.show-hidden { margin-top: 18px; }
.danger-text { color: #e08a8a; justify-content: center; }
.yt-dot.sc { background: #ff7a1a; }

/* the Everplay account */
.item small.warn { color: #e0b27c; }
.danger-text.left { justify-content: flex-start; }
.item em.accent { font-style: normal; color: var(--accent); }
.account .error { color: #e08a8a; font-size: 14px; }
.account .link-btn { justify-self: start; color: var(--accent); font-size: 14.5px; padding: 2px 0; }
.account .btn-primary { width: 100%; }
.recovery-key { font: 600 19px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 1px; text-align: center;
                padding: 16px 10px; border-radius: 12px; border: 1px solid var(--accent); background: var(--surface); user-select: all; word-break: break-all; }
.account .check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.account .check input { width: 22px; height: 22px; accent-color: var(--accent); }
.more-rows { display: flex; justify-content: center; width: 100%; margin-top: 12px; }

/* the equalizer */
.eq-entry { margin-top: 12px; }
.eq-entry .item svg { color: var(--accent); }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 15px; margin-bottom: 4px; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-hi); position: relative; flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--dim); transition: transform .2s var(--ease), background .2s; }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(18px); background: var(--on-accent); }
.eq-note { margin: 10px 2px 0; }
.eq-curve { display: block; width: 100%; height: 120px; margin: 16px 0 8px; border-radius: 14px; background: var(--surface); }
.eq-curve .zero { stroke: var(--line); stroke-width: 1; fill: none; }
.eq-curve .line { stroke: var(--accent); stroke-width: 2.5; fill: none; vector-effect: non-scaling-stroke; }
.eq-curve.off .line { stroke: var(--faint); }
.eq-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.eq-presets button { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); color: var(--dim); font-size: 14px; font-weight: 600; }
.eq-presets button.on { background: var(--accent); color: var(--on-accent); }
.eq-bands.off { opacity: .55; }
.eq-band { gap: 12px; }
.eq-band .eq-freq { width: 104px; flex: none; font-size: 14px; color: var(--dim); }
.eq-band .eq-db { width: 74px; flex: none; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.eq-band input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.eq-reset { margin-top: 14px; }

/* a playlist into the listening room */
.room-add-btn { margin-top: 10px; }
.room-next-head { display: flex; align-items: center; flex-wrap: wrap; }
.room-next-head h2 { flex: 1; }
.search-kinds { justify-content: flex-start; margin: 12px 0 4px; }
/* the field has its own clear button */
.search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.chip { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; margin-left: 8px; border-radius: 999px; background: var(--surface); color: var(--dim); font-size: 14px; font-weight: 600; }
.chip svg { width: 18px; height: 18px; margin-right: 6px; }
.room-add-body { padding: 4px 16px 16px; }
.room-add-body .modes { margin-top: 10px; }
.room-add-body .btn-primary { margin-top: 14px; }
.room-add .mode { text-align: center; }
.room-range { display: flex; align-items: center; flex-wrap: wrap; }
.room-range > * { margin-right: 8px; }
.room-range input { width: 84px; height: 44px; padding: 0 10px; border: 0; border-radius: 12px; background: var(--surface); color: var(--text); font-size: 17px; text-align: center; -webkit-user-select: text; user-select: text; }
.room-range .chip { margin-left: 0; }
.room-range-what { margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actions .head .ico-cover svg { width: 26px; height: 26px; }

/* Once, for people coming from Nokturn: the show of the new name (assets/intro.js) */
.evi { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 9999; background: #040508; overflow: hidden;
  font-family: Inter, system-ui, sans-serif; color: #fff; text-align: center; -webkit-user-select: none; user-select: none;
  transition: opacity .6s ease-in, transform .6s ease-in; }
.evi.evi-out { opacity: 0; transform: scale(1.06); }
.evi * { box-sizing: border-box; }
.evi-c { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.evi-skip { position: absolute; top: 18px; right: 18px; padding: 8px 12px; background: none; border: 0; color: rgba(255,255,255,.5);
  font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; z-index: 3; animation: evi-hide .3s 6.2s forwards; }
.evi-skip:hover { color: #fff; }
.evi-glow { position: absolute; border-radius: 50%; opacity: 0; animation: evi-fade 1.7s 2.5s ease-out forwards, evi-drift 9s 2.5s ease-in-out infinite alternate; }
.evi-glow.a { width: 130vmax; height: 130vmax; left: -55vmax; top: -70vmax; background: radial-gradient(closest-side, var(--accent), transparent); }
.evi-glow.b { width: 120vmax; height: 120vmax; right: -60vmax; bottom: -70vmax; background: radial-gradient(closest-side, var(--accent2), transparent);
  animation-direction: normal, alternate-reverse; }
.evi-cap { position: absolute; left: 0; right: 0; top: calc(50% - 96px); font-size: 14px; font-weight: 600; letter-spacing: 4px;
  color: rgba(255,255,255,.55); opacity: 0; animation: evi-fade .5s .5s forwards, evi-hide .4s 1.5s forwards; }
.evi-old { position: absolute; left: 0; right: 0; top: 50%; margin-top: -0.6em; font-size: 84px; font-size: min(84px, 17vw); font-weight: 300;
  letter-spacing: .08em; line-height: 1.2; white-space: nowrap; color: #b6c8be; }
.evi-old span { display: inline-block; opacity: 0;
  animation: evi-rise .6s var(--d1) ease-out both, evi-fly .8s var(--d2) cubic-bezier(.55,0,.9,.4) forwards; }
.evi-streak { position: absolute; top: 50%; left: 0; width: 60vw; height: 2px; margin-top: -1px; opacity: 0;
  background: linear-gradient(90deg, transparent, #fff 80%, transparent); box-shadow: 0 0 22px 6px rgba(255,255,255,.18);
  transform: translateX(-60vw); animation: evi-streak .75s 1.45s cubic-bezier(.2,.7,.3,1) forwards; }
.evi-flash { position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0; background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: evi-flash .4s 2.42s ease-out; }
.evi-ring { position: absolute; left: -75vmax; top: -75vmax; width: 150vmax; height: 150vmax; border-radius: 50%;
  border: 3px solid var(--accent); opacity: 0; transform: scale(.02); animation: evi-ring 1.25s var(--d) cubic-bezier(.2,.7,.3,1) forwards; }
.evi-dot { position: absolute; left: 0; top: 0; border-radius: 50%; opacity: 0;
  animation: evi-burst var(--t) 2.5s cubic-bezier(.15,.75,.3,1) forwards; }
.evi-stage { position: absolute; left: 0; right: 0; top: 0; bottom: 0; animation: evi-up .75s 3.55s cubic-bezier(.2,.7,.3,1) forwards; }
.evi-halo { position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent), transparent); opacity: 0; animation: evi-halo .9s 2.7s ease-out forwards; }
.evi-logo { position: absolute; left: 50%; top: 50%; width: 144px; height: 144px; margin: -72px 0 0 -72px; border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55); opacity: 0; transform: scale(0) rotate(-200deg);
  animation: evi-logo .85s 2.65s cubic-bezier(.34,1.56,.64,1) forwards; }
.evi-low { position: absolute; left: 0; right: 0; top: calc(50% + 96px); padding: 0 20px; }
.evi-word { position: relative; display: inline-block; font-size: 104px; font-size: min(104px, 20vw); font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  text-shadow: 0 0 0 transparent; animation: evi-glowtext .8s 4.2s forwards; }
.evi-word span:not(.evi-shine) { display: inline-block; opacity: 0; animation: evi-letter .7s var(--d) cubic-bezier(.34,1.56,.64,1) forwards; }
.evi-shine { position: absolute; left: 0; top: 0; right: 0; bottom: 0; color: transparent; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.95) 50%, transparent 65%) no-repeat;
  background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text;
  animation: evi-shine .85s 4.75s ease-out forwards; }
.evi-tag { max-width: 640px; margin: 10px auto 0; font-size: 17px; line-height: 1.45; color: rgba(255,255,255,.75); opacity: 0;
  animation: evi-rise .6s 4.7s ease-out both; }
.evi-chips { display: flex; flex-wrap: wrap; justify-content: center; max-width: 720px; margin: 20px auto 0; }
.evi-chip { margin: 5px; padding: 9px 15px; border-radius: 19px; font-size: 14px; font-weight: 600; opacity: 0;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.18); animation: evi-pop .55s var(--d) cubic-bezier(.34,1.56,.64,1) forwards; }
.evi-chip::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--accent); }
.evi-go { position: relative; margin-top: 26px; padding: 13px 30px; border: 0; border-radius: 26px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 700 16px Inter, system-ui, sans-serif; opacity: 0;
  animation: evi-rise .5s 5.9s ease-out both; }
.evi-go::after { content: ''; position: absolute; left: -2px; top: -2px; right: -2px; bottom: -2px; border-radius: 28px;
  border: 2px solid var(--accent); opacity: 0; animation: evi-call 1.6s 6.3s ease-out infinite; }
.evi.evi-skipped *, .evi.evi-skipped *::before { animation-delay: 0s !important; animation-duration: 1ms !important; }
.evi.evi-skipped .evi-glow { animation-duration: 1ms, 9s !important; }
.evi.evi-skipped .evi-go::after { animation: evi-call 1.6s .3s ease-out infinite !important; }
@media (prefers-reduced-motion: reduce) {
  .evi *, .evi *::before, .evi *::after { animation-delay: 0s !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
@keyframes evi-fade { to { opacity: .8; } }
@keyframes evi-hide { to { opacity: 0; visibility: hidden; } }
@keyframes evi-drift { from { transform: translate(0, 0); } to { transform: translate(6vmax, 4vmax); } }
@keyframes evi-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes evi-fly { to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1.8); } }
@keyframes evi-streak { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; transform: translateX(100vw); } }
@keyframes evi-flash { 30% { opacity: .35; } 100% { opacity: 0; } }
@keyframes evi-ring { 0% { opacity: .9; transform: scale(.02); } 100% { opacity: 0; transform: scale(1); border-width: 1px; } }
@keyframes evi-burst { 0% { opacity: 1; transform: translate(0, 0); } 70% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--x), var(--y)); } }
@keyframes evi-up { to { transform: translateY(-110px); } }
@keyframes evi-halo { to { opacity: .45; } }
@keyframes evi-logo { 0% { opacity: 0; transform: scale(0) rotate(-200deg); } 25% { opacity: 1; } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes evi-letter { from { opacity: 0; transform: translateY(70px) rotate(var(--r)); } to { opacity: 1; transform: none; } }
@keyframes evi-glowtext { to { text-shadow: 0 0 28px var(--accent), 0 0 4px rgba(255,255,255,.6); } }
@keyframes evi-shine { to { background-position: 0 0; } }
@keyframes evi-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes evi-call { 0% { opacity: .7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35, 1.6); } }
