/* The web player (/player, js/wp-*.js). Built on styles.css: its colours,
   type, buttons, cards and the AutoEQ page's chips and graphs. The frame is a
   top bar, a menu on the left, the page, and the bar at the bottom; on a phone
   the menu becomes a row of tabs and the bar stacks. */

/* --bar-h is the room kept free at the bottom: the floating bar and the gap under it
   (js/wp-app.js keeps it to the bar's real height). */
.wp { --bar-gap: 12px; --bar-h: 100px; --top-h: 64px; min-height: 100vh; }
.wp .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wp-skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 10px; }
.wp-skip:focus { left: 8px; }
.wp section { padding: 0; }
/* The cards' pointer light needs site.js to follow the pointer; the player does without both. */
.wp .card::after { display: none; }
.wp h1 { font-family: var(--heading); font-weight: 600; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 8px; }
.wp h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 26px 0 10px; }
.wp-tile h2 { margin: 0 0 12px; font-size: 18px; }
.wp .bad { color: #ff6b6b; }
[data-design="white"] .wp .bad { color: #c92a2a; }
.wp-mono { font-variant-numeric: tabular-nums; }

/* ── Icon buttons ── */
.wp-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: 0 0 auto;
  border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer;
}
.wp-icon svg { width: 22px; height: 22px; display: block; }
.wp-icon:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.wp-icon[aria-pressed="true"] { color: var(--ok); }
.wp-play { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.wp-play:hover { background: var(--accent); opacity: 0.9; }
.wp-i { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.wp-i svg { width: 18px; height: 18px; }
.btn.wp-small { padding: 6px 12px; font-size: 13px; }

/* ── Top bar ── */
.wp-top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--header); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.wp-top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 19px; }
.wp-top .mark { width: 30px; height: 30px; }
[data-design="dark"] .wp-top .mark-tile { fill: #f2f2f2; }
[data-design="dark"] .wp-top .mark path { stroke: #0a0a0a; }
.wp-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.wp-search {
  flex: 1 1 280px; max-width: 560px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.wp-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: 0 0 auto; }
.wp-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: inherit; font-size: 15px; }
.wp-search:focus-within { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.wp-search kbd { font: 11px ui-monospace, monospace; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.wp-top-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wp-pill { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.wp-pill.ok { color: var(--ok); }
.wp-pill.ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: 1px; }

/* ── Frame ── */
.wp-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.wp-side {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h) - var(--bar-h));
  overflow: auto; padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px;
}
.wp-side a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
  color: var(--accent-2); text-decoration: none; font-size: 15px;
}
.wp-side a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 5%, transparent); }
.wp-side a[aria-current="page"] { background: var(--panel-2); color: var(--text); font-weight: 600; }
.wp-side small { color: var(--muted); font-size: 12px; }
.wp-side a[hidden] { display: none; }
.wp-side .langs {
  margin-top: auto; padding: 14px 12px 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px;
}
.wp-side .langs a { display: inline; padding: 0; border-radius: 0; font-size: 13px; color: var(--muted); }
.wp-side .langs a:hover { background: none; color: var(--text); text-decoration: underline; }
.wp-side .langs a[aria-current] { color: var(--text); font-weight: 600; }
.wp-unlock { flex: 1 1 100%; }
.wp-unlock summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent-2); }
.wp-unlock[open] summary { margin-bottom: 10px; }
.wp-main { min-width: 0; padding: 28px 32px calc(var(--bar-h) + 40px); outline: none; }
.wp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }
.wp-head p { margin: 0; max-width: 64ch; }
.wp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.wp-row .buttons { margin: 0; }
.wp-grow { flex: 1; }
.wp-input {
  font: inherit; font-size: 15px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; min-width: 0; flex: 1 1 240px;
}
.wp .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-empty { display: grid; gap: 12px; justify-items: start; max-width: 560px; }
.wp-empty p { margin: 0; }
.wp-toast {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + 14px); margin: 0;
  max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 12px; font-size: 14px;
  background: var(--panel-2); border: 1px solid var(--line); box-shadow: var(--glass-shadow);
}

/* ── Switch ── */
.wp-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.wp-switch input { width: 20px; height: 20px; accent-color: var(--c-ts); }

/* ── Dashboard tiles (B) ── */
.wp-tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.wp-tile { flex: 1 1 320px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.wp-tile > p { margin: 0 0 10px; }
.wp-now, #tile-eq { flex: 2 1 560px; }
.wp-now { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; background: #111; color: #f2f2f2; border-color: #111; }
[data-design="dark"] .wp-now { background: var(--panel-2); border-color: var(--line); }
.wp-now .muted { color: #bdbdbd; }
.wp-now .eyebrow { margin: 0; color: #9a9a9a; }
.wp-now .btn:not(.primary) { color: #f2f2f2; background: rgba(255, 255, 255, 0.1); }
.wp-now .btn.primary { background: #f2f2f2; color: #111; border-color: #f2f2f2; }
.wp-now .wp-icon { color: #f2f2f2; }
.wp-now .wp-play { background: #f2f2f2; color: #111; }
.wp-now.is-empty { flex-direction: column; align-items: flex-start; gap: 10px; }
.wp-now.is-empty p { margin: 0; }
.wp-now-cover { width: 180px; height: 180px; border-radius: 16px; object-fit: cover; flex: 0 0 auto; }
.wp-now-text { flex: 1 1 280px; min-width: 0; display: grid; gap: 8px; }
.wp-now-text p { margin: 0; }
.wp-now-title { font-family: var(--heading); font-size: 32px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 4px 0 !important; }
.wp-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-badges span { font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; padding: 3px 8px; }
.wp-badges span:first-child { background: #f2f2f2; color: #111; border-color: #f2f2f2; }
.wp-progress { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.wp-progress span { display: block; height: 100%; background: #f2f2f2; }
.wp-controls { display: flex; align-items: center; gap: 6px; }
.wp-mini-graph { margin: 6px 0 12px; }
.wp-path, .wp-next, .wp-sources { list-style: none; margin: 0; padding: 0; display: grid; }
.wp-path li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.wp-path li .muted { font-size: 13px; font-variant-numeric: tabular-nums; }
.wp-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--muted); }
.wp-path li.on .wp-dot { background: var(--text); border-color: var(--text); }
.wp-next { gap: 10px; margin-bottom: 14px; }
.wp-next li, .wp-sources li > div { display: grid; gap: 2px; min-width: 0; }
.wp-sources { gap: 10px; }
.wp-sources li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.wp-sources li > div { flex: 1 1 200px; }
.wp-src-hifi .wp-form { flex: 1 1 100%; }
.wp-set { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 7%, transparent); font-size: 15px; }
.wp-set:last-child { border-bottom: 0; }
.wp-set > span { display: grid; gap: 2px; }
.wp-set small { font-size: 12px; }
.wp-set input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.wp-set input[type="range"] { flex: 1 1 140px; accent-color: var(--accent); }
.wp-form { display: grid; gap: 6px; }
.wp-form label { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.wp-form .buttons { margin-top: 8px; }
.wp-form p { margin: 4px 0 0; }
.wp-details summary { cursor: pointer; font-weight: 600; }
.wp-details[open] summary { margin-bottom: 12px; }
.wp-details { margin-top: 26px; max-width: 560px; }
.wp-tabs { margin: 0 0 16px; }
.wp-note { margin: 0 0 16px; padding: 12px 16px; font-size: 14px; max-width: 640px; }

/* ── Track lists (A) ── */
.wp-tracks { list-style: none; margin: 0; padding: 0; }
.wp-track { display: flex; align-items: center; border-radius: 10px; }
.wp-track:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.wp-track.is-current { background: var(--panel-2); }
.wp-track-play {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 2fr) minmax(0, 1fr) 110px 56px; gap: 12px; align-items: center;
  padding: 9px 12px; background: transparent; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: 10px;
}
.no-album .wp-track-play { grid-template-columns: 40px minmax(0, 1fr) 110px 56px; }
.wp-track-n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.is-current .wp-track-n { color: var(--ok); font-weight: 700; }
.wp-track-main { display: grid; min-width: 0; }
.wp-track-main strong, .wp-track-main span, .wp-track-album { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-track-main strong { font-weight: 500; font-size: 15px; }
.is-current .wp-track-main strong { font-weight: 700; }
.wp-track-main span, .wp-track-album { font-size: 13px; }
.wp-track-q { font-size: 12px; color: var(--accent-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-track-len { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.wp-track-add { opacity: 0.55; }
.wp-track:hover .wp-track-add, .wp-track-add:focus-visible { opacity: 1; }

/* ── Folders, albums, crumbs ── */
.wp-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; font-size: 15px; }
.wp-crumbs a { color: var(--accent-2); text-decoration: none; }
.wp-crumbs a[aria-current="page"] { color: var(--text); font-weight: 600; }
.wp-crumbs span { color: var(--muted); }
.wp-folders { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.wp-folders a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
}
.wp-folders a:hover { border-color: var(--accent-2); }
.wp-folders strong { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-albums { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.wp-albums a { display: grid; gap: 4px; text-decoration: none; color: var(--text); }
.wp-albums img, .wp-albums .wp-cover-none { width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; object-fit: cover; display: block; }
.wp-albums strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-album-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; margin-bottom: 20px; }
.wp-album-head img, .wp-album-head .wp-cover-none { width: 200px; height: 200px; border-radius: 16px; object-fit: cover; }
.wp-album-head > div { flex: 1 1 280px; display: grid; gap: 8px; }
.wp-album-head p { margin: 0; }
.wp-cover-none { display: block; background: var(--panel-2); border: 1px solid var(--line); }

/* ── AutoEQ (the AutoEQ page's try-out, full length) ── */
#view-autoeq .try { display: grid; gap: 18px; }
#view-autoeq .wp-chipped { display: none; }
.wp-chips { margin: 0; }
#view-autoeq .g-card { margin: 0; }
#view-autoeq .try-bands .buttons { margin: 12px 0; }

/* ── Queue ── */
.wp-queue {
  position: fixed; z-index: 35; right: 12px; top: calc(var(--top-h) + 12px); bottom: calc(var(--bar-h) + 12px); width: min(380px, calc(100vw - 24px));
  overflow: auto; padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--glass-shadow);
}
.wp-queue-head { display: flex; justify-content: space-between; align-items: center; }
.wp-queue-head h2 { margin: 0; }
.wp-queue ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.wp-queue li { display: flex; align-items: center; border-radius: 10px; }
.wp-queue li.is-current { background: var(--panel-2); }
.wp-queue-song { flex: 1; min-width: 0; display: grid; text-align: left; padding: 8px 10px; background: transparent; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.wp-queue-song strong, .wp-queue-song span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-queue-song strong { font-weight: 500; }
.wp-queue-song span { font-size: 13px; }

/* ── The bar: liquid glass, floating, like the site's menu and the app's mini
   player. The page scrolls on under it, bent at the rim (js/glass.js). ── */
.wp-bar {
  position: fixed; z-index: 30; left: var(--bar-gap); right: var(--bar-gap); bottom: var(--bar-gap); height: 88px; margin: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px; padding: 0 18px 0 14px;
  border-radius: 26px; color: var(--text); font-size: 14px;
}
/* The app's player glass (its "Float" preset): the page behind blurred and bent
   at the rim, under the cover's own colour at about a quarter (--tint, from
   js/wp-app.js; clear glass with no cover), denser here than the app's so the
   page cannot read through the controls. A crisp rim lit from the top left,
   a cool fill at the bottom right, no line inside the bevel, a still glint,
   and a shadow dropped 8px. Nothing moves across it. */
.wp-bar { --tint: 126 182 255; --tint-a: 0; }
.wp-bar[style*="--tint"] { --tint-a: 0.32; }
[data-design="white"] .wp-bar[style*="--tint"] { --tint-a: 0.24; }
.wp-bar.glass {
  --glass-blur: 12px; --glass-bend: 24;
  background: linear-gradient(rgb(var(--tint) / var(--tint-a)), rgb(var(--tint) / var(--tint-a))), color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
          backdrop-filter: blur(12px) saturate(170%);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.6),
    inset 0 -12px 20px -14px rgba(5, 6, 8, 0.7),
    inset 0 0 22px -6px rgba(210, 225, 255, 0.10);
}
/* Black: clear glass, not a dark slab. Little of the page colour, a stronger
   blur so the page still cannot be read, light falling in from the top and a
   brighter edge, so it reads as glass over a black page as the white one does
   over a white one. */
[data-design="dark"] .wp-bar.glass {
  --glass-blur: 28px;
  background:
    linear-gradient(rgb(var(--tint) / calc(var(--tint-a) * 0.7)), rgb(var(--tint) / calc(var(--tint-a) * 0.7))),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 40%, rgba(255, 255, 255, 0.02)),
    color-mix(in srgb, var(--bg) 18%, transparent);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
          backdrop-filter: blur(28px) saturate(170%);
  box-shadow:
    0 8px 26px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -10px 18px -12px rgba(5, 6, 8, 0.4),
    inset 0 0 30px -2px rgba(210, 225, 255, 0.2);
}
[data-design="white"] .wp-bar.glass {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22), inset 0 -12px 20px -14px rgba(5, 6, 8, 0.18), inset 0 0 22px -6px rgba(255, 255, 255, 0.5);
}
.lens .wp-bar.glass[data-lens] {
  -webkit-backdrop-filter: var(--lens) saturate(170%);
          backdrop-filter: var(--lens) saturate(170%);
}
.wp-bar.glass::before {
  padding: 1px; opacity: 1;
  background: linear-gradient(162deg, rgba(255, 247, 235, 0.95) 0%, rgba(209, 224, 255, 0.55) 16%, rgba(209, 224, 255, 0.08) 40%,
    transparent 62%, rgba(166, 209, 255, 0.18) 85%, rgba(166, 209, 255, 0.45) 100%);
}
.wp-bar.glass::after {
  background: radial-gradient(90px 22px at 14% 0%, rgba(255, 255, 255, 0.55), transparent 70%);
  mix-blend-mode: normal; opacity: 0.55;
}

/* The play button: the same glass in a disc, the cover's colour stronger, and
   a squeeze to 92% on a spring when pressed. */
.wp-bar .wp-play {
  position: relative; color: var(--text);
  background: radial-gradient(120% 90% at 30% 10%, rgba(255, 255, 255, 0.28), transparent 55%), rgb(var(--tint) / calc(var(--tint-a) * 1.6 + 0.08));
  box-shadow:
    inset 0 1px 1px rgba(255, 247, 235, 0.85),
    inset 0 -1px 1px rgba(166, 209, 255, 0.35),
    inset 0 -8px 12px -6px rgba(5, 6, 8, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 8px 18px -6px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s;
}
[data-design="white"] .wp-bar .wp-play {
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 1px rgba(120, 160, 220, 0.3), inset 0 -8px 12px -6px rgba(5, 6, 8, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 18px -6px rgba(0, 0, 0, 0.25);
}
.wp-bar .wp-play:hover { background: radial-gradient(120% 90% at 30% 10%, rgba(255, 255, 255, 0.36), transparent 55%), rgb(var(--tint) / calc(var(--tint-a) * 1.6 + 0.14)); opacity: 1; }
.wp-bar .wp-play:active { transform: scale(0.92); transition-duration: 0.12s; }

/* The timeline and the volume: the app's glass tube (drawn by js/wp-app.js),
   the real range input on top of it, unseen, its thumb as wide as the swelling. */
.wp-tube-wrap { position: relative; flex: 1; height: var(--tube-h, 24px); min-width: 0; }
.wp-bar-end .wp-tube-wrap { flex: 0 0 110px; }
.wp-tube { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wp-tube-rest { fill: color-mix(in srgb, var(--text) 22%, transparent); }
.wp-tube-played { fill: rgb(var(--tint) / 0.6); }
.wp-tube-core { fill: rgb(var(--tint) / 0.8); }
.wp-tube-rim { stroke-width: 1; }
[data-design="white"] .wp-tube-rest { fill: color-mix(in srgb, var(--text) 14%, transparent); }
[data-design="white"] .wp-tube-played { fill: rgb(var(--tint) / 0.75); }
[data-design="white"] .wp-tube-core { fill: rgb(var(--tint) / 0.9); }
.wp-bar .wp-tube-wrap input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: none;
}
.wp-tube-wrap input::-webkit-slider-runnable-track { height: var(--tube-h, 24px); background: none; }
.wp-tube-wrap input::-webkit-slider-thumb { -webkit-appearance: none; width: var(--tube-thumb, 44px); height: var(--tube-h, 24px); }
.wp-tube-wrap input::-moz-range-track { height: var(--tube-h, 24px); background: none; }
.wp-tube-wrap input::-moz-range-thumb { width: var(--tube-thumb, 44px); height: var(--tube-h, 24px); border: 0; border-radius: 0; }
.wp-tube-wrap:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; border-radius: 12px; }
.wp-bar-song { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wp-cover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.wp-bar-text { display: grid; min-width: 0; }
.wp-bar-text strong, .wp-bar-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-bar-text strong { font-weight: 600; }
.wp-bar-text span { font-size: 13px; }
.wp-bar-mid { display: grid; justify-items: center; gap: 2px; }
.wp-seek { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wp-seek input { flex: 1; accent-color: var(--accent); }
.wp-bar-end { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.wp-badge { font-size: 12px; color: var(--accent-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

/* ── Tryptify Connect ── */
.wp-icon.lit { color: var(--ok); }
.wp-elsewhere {
  position: fixed; z-index: 29; left: var(--bar-gap); right: var(--bar-gap); bottom: calc(var(--bar-h) + 6px); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 8px 18px 10px; background: var(--ok); color: #0a0a0a; font-size: 14px; overflow: hidden; border-radius: 18px;
}
[data-design="white"] .wp-elsewhere { color: #fff; }
.wp-elsewhere .wp-icon { color: inherit; width: 40px; height: 40px; }
.wp-elsewhere .wp-icon:hover { background: rgba(0, 0, 0, 0.12); }
.wp-elsewhere .btn { background: rgba(0, 0, 0, 0.85); color: #fff; border-color: transparent; }
.wp-elsewhere-text { display: grid; flex: 1 1 200px; min-width: 0; }
.wp-elsewhere-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.wp-elsewhere-time { font-variant-numeric: tabular-nums; font-size: 13px; opacity: 0.85; white-space: nowrap; }
.wp-elsewhere-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, 0.18); }
.wp-elsewhere-bar span {
  display: block; height: 100%; background: currentColor; width: var(--from, 0%);
  animation: wp-run var(--left, 1s) linear forwards; animation-play-state: var(--state, paused);
}
@keyframes wp-run { from { width: var(--from, 0%); } to { width: 100%; } }
body.has-elsewhere .wp-main { padding-bottom: calc(var(--bar-h) + 110px); }
#tile-connect { display: flex; flex-direction: column; gap: 12px; }
#tile-connect h2 { margin-bottom: 0; }
.wp-connect-card { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.wp-connect-card .eyebrow { margin: 0; color: var(--ok); }
.wp-connect-card strong { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-connect-card .wp-row { margin: 4px 0 0; }
.wp-connect-bar { height: 3px; margin-top: 6px; border-radius: 2px; background: color-mix(in srgb, var(--text) 14%, transparent); overflow: hidden; }
.wp-connect-bar span { display: block; height: 100%; background: var(--ok); width: var(--from, 0%); animation: wp-run var(--left, 1s) linear forwards; animation-play-state: var(--state, paused); }
#tile-connect .wp-device-list { margin: 0; }
.wp-devices {
  position: fixed; z-index: 36; right: 12px; bottom: calc(var(--bar-h) + 12px); width: min(360px, calc(100vw - 24px));
  padding: 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--glass-shadow);
}
.wp-devices h2 { margin: 0 0 10px; font-size: 16px; }
.wp-devices p { margin: 0 0 10px; }
.wp-device-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.wp-device {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.wp-device:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 7%, transparent); }
.wp-device:disabled { cursor: default; }
.wp-device.is-active { background: var(--panel-2); color: var(--ok); }
.wp-device-text { flex: 1; display: grid; min-width: 0; }
.wp-device-text strong { font-weight: 600; }
.wp-device-go { font-size: 13px; font-weight: 600; color: var(--accent-2); }
.wp-device:disabled .wp-device-go { display: none; }

/* ── Narrow screens ── */
@media (max-width: 1000px) {
  .wp-track-play { grid-template-columns: 32px minmax(0, 1fr) 90px 48px; }
  .wp-track-album { display: none; }
}
@media (max-width: 820px) {
  .wp { --bar-gap: 8px; --bar-h: 150px; --top-h: 60px; }
  .wp-top { gap: 8px; padding: 0 12px; }
  .wp-top .wordmark, .wp-tag, .wp-search kbd, .wp-pill { display: none; }
  .wp-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .wp-side {
    position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 12px; gap: 4px;
    border-right: 0; border-bottom: 1px solid var(--line);
  }
  .wp-side a { flex: 0 0 auto; padding: 9px 12px; white-space: nowrap; }
  .wp-side .langs { display: none; }
  .wp-main { padding: 20px 16px calc(var(--bar-h) + 30px); }
  .wp-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 10px; padding: 10px 14px; height: auto; border-radius: 24px; }
  .wp-bar-mid { grid-column: 1 / -1; grid-row: 2; }
  .wp-bar-end input, .wp-bar-end .wp-tube-wrap, .wp-badge, #bar-mute { display: none; }
  .wp-now-cover { width: 120px; height: 120px; }
  .wp-now-title { font-size: 24px; }
  .wp-track-play { grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 8px; padding: 9px 6px; }
  .wp-track-q { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .wp-icon, .wp-side a, .wp-folders a { transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
}

/* ── The full-screen player (js/wp-full.js) ──
   Over the page, under the bar (which keeps its controls); always dark, on
   the song's own art, blurred, like the app's player. */
.wp-full {
  position: fixed; z-index: 31; inset: 0 0 var(--full-bottom, var(--bar-h)) 0; display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: #070708; color: #fff; overflow: hidden;
}
.wp-full[hidden] { display: none; }
.wp-full-bg {
  position: absolute; inset: -60px; background: #070708 center / cover no-repeat;
  filter: blur(60px) saturate(1.3) brightness(0.45); transform: scale(1.1);
}
.wp-full-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.6)); }
.wp-full-top { position: relative; display: flex; align-items: center; gap: 8px; padding: 14px 18px; }
.wp-full .wp-icon { color: #fff; }
.wp-full .wp-icon:hover { background: rgba(255, 255, 255, 0.12); }
.wp-full-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.wp-full-mode {
  font: inherit; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.75); background: transparent;
  border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.wp-full-mode[aria-selected="true"] { background: #fff; color: #000; }
.wp-full-body { position: relative; min-height: 0; }

.wp-full-lyrics {
  height: 100%; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr); gap: 48px; align-items: center;
  padding: 0 clamp(20px, 5vw, 80px) 24px;
}
.wp-full-lyrics[hidden] { display: none; }
.wp-full-art { margin: 0; display: grid; gap: 18px; justify-items: start; align-self: center; }
.wp-full-art img, .wp-full-cover-none {
  width: min(100%, 52vh, 520px); aspect-ratio: 1; border-radius: 14px; object-fit: cover; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.wp-full-cover-none { display: block; background: rgba(255, 255, 255, 0.08); }
.wp-full-cover-none[hidden] { display: none; }
.wp-full-art figcaption { display: grid; gap: 4px; min-width: 0; max-width: 100%; }
.wp-full-art strong { font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.wp-full-art span { color: rgba(255, 255, 255, 0.72); font-size: 16px; }
.wp-full-on { color: var(--ok) !important; font-size: 14px !important; font-weight: 600; }
.wp-full-on:empty { display: none; }
.wp-full-lines-box {
  height: 100%; min-height: 0; align-self: stretch; overflow-y: auto; scrollbar-width: none; padding: 30vh 0 40vh;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 78%, transparent);
}
.wp-full-lines-box::-webkit-scrollbar { display: none; }
.wp-full-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.wp-full-lines li {
  font-size: clamp(22px, 2.4vw, 34px); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em;
  color: rgba(255, 255, 255, 0.42); cursor: pointer; border-radius: 8px; transition: color 0.25s ease, transform 0.25s ease;
  transform-origin: left center;
}
.wp-full-lines li:hover { color: rgba(255, 255, 255, 0.7); }
.wp-full-lines li.is-past { color: rgba(255, 255, 255, 0.28); }
.wp-full-lines li.is-now { color: #fff; transform: scale(1.03); }
.wp-full-lines li:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.wp-full-note { margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 16px; }
.wp-full-note:empty { display: none; }

.wp-full-wf { position: absolute; inset: 0; }
.wp-full-wf[hidden] { display: none; }
.wp-full-wf canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wp-full-wf .wp-full-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; max-width: 80vw; }

body.has-full .wp-elsewhere { display: none; }
@media (max-width: 820px) {
  .wp-full-lyrics { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .wp-full-art { grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; }
  .wp-full-art img, .wp-full-cover-none { width: 64px; border-radius: 8px; box-shadow: none; }
  .wp-full-art strong { font-size: 18px; }
  .wp-full-art span { font-size: 14px; }
  .wp-full-lines-box { padding: 20vh 0 40vh; }
  .wp-full-lines li { font-size: 24px; }
  .wp-full-top { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { .wp-full-lines li { transition: none; } .wp-full-lines li.is-now { transform: none; } }
