/* AURA — style.css v10
   ─────────────────────────────────────────────────────────────────────────────
   [CHANGES vs v8]
   · Bouton éclair (btn-lanyard-status / .lanyard-badge) : supprimé du CSS.
   · Nouvelles variables CSS : --lyrics-backdrop-blur, --shadow-dx/dy/blur/opacity.
   · --text-shadow-legible utilise désormais les variables shadow pour contrôle total.
   · Mode Focus Album (zen) : suppression du !important sur #ui → l'overlay
     réapparaît lors des mouvements de souris (is-idle system), se cache après 2s.
   · Lyrics lisibilité : backdrop-filter sur le panel, ombre paramétrable.
   · body.lyrics-light-text : texte adapté pour fond clair (algo JS → classe CSS).
   · Lyrics blur modes : .lyrics-blur-standard (frosted glass) + .lyrics-blur-apple
     (gradient animé vibrant façon Apple Music).
   · Art glow pulsé : body.art-glow-pulse → animation glowPulse sur .art-glow.
   · Album art scale up en mode Focus (1.15×, était 1.06×).
   ─────────────────────────────────────────────────────────────────────────────
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS
════════════════════════════════════════════════════════════════════════════ */
:root {
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0, 0, 0.2, 1);
  --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --snap:      cubic-bezier(0.23, 1, 0.32, 1);

  --t1: .25s;
  --t2: .55s;
  --t3: 1.1s;

  --blur-amount:   70px;
  --accent:        #e0245e;
  --primary:       #7c3aed;
  --bg-brightness: 0.55;
  --bg-saturate:   1.4;
  --art-radius:    22px;
  --mq-speed:      38s;
  --hero-scale:    1;
  --lyrics-size:   1;
  --lyrics-weight:         400;
  --lyrics-letter-spacing: 0em;
  --lyrics-line-height:    1.8;

  /* [NEW] Lyrics backdrop blur (controlled by slider) */
  --lyrics-backdrop-blur: 0px;

  /* [NEW] Text shadow — fully parameterised */
  --shadow-dx:      0px;
  --shadow-dy:      1px;
  --shadow-blur:    3px;
  --shadow-opacity: 0.55;

  /* [v8] Lyrics colors */
  --lyrics-active-color:   #e0245e;
  --lyrics-inactive-color: rgba(255,255,255,0.42);
  --lyrics-near-color:     rgba(255,255,255,0.72);
  --lyrics-custom-bg:      transparent;

  /* [v8] Decorative dots */
  --dots-color:      #e0245e;
  --dots-brightness: 0.70;
  --dots-size:       10px;
  --dots-duration:   1.2s;

  /* [v10] Title-color ambiance */
  --tcbg-brightness: 1;
  --tcbg-contrast:   1;

  --ui-solid:   rgba(255, 255, 255, 1.00);
  --ui-bright:  rgba(255, 255, 255, 0.85);
  --ui-mid:     rgba(255, 255, 255, 0.60);
  --ui-dim:     rgba(255, 255, 255, 0.35);
  --ui-soft:    rgba(255, 255, 255, 0.08);
  --ui-ghost:   rgba(255, 255, 255, 0.10);
  --ui-faint:   rgba(255, 255, 255, 0.04);

  /* [UPDATED] Uses parameterised shadow vars */
  --text-shadow-legible:
    var(--shadow-dx) var(--shadow-dy) var(--shadow-blur) rgba(0,0,0,var(--shadow-opacity)),
    0 2px 8px rgba(0,0,0,calc(var(--shadow-opacity) * 0.73));
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden; background: #000; color: #fff;
  font-family: 'Instrument Sans', sans-serif;
}

body.f-modern, body.f-modern * { font-family: 'Outfit', sans-serif !important; }
body.f-inter,  body.f-inter  * { font-family: 'Inter', sans-serif !important; }
body.f-serif,  body.f-serif  * { font-family: 'Playfair Display', serif !important; }
body.f-mono,   body.f-mono   * { font-family: 'JetBrains Mono', monospace !important; }

svg[aria-hidden="true"] { pointer-events: none; }


/* ═══════════════════════════════════════════════════════════════════════════
   NOISE GRAIN (z 9999)
═══════════════════════════════════════════════════════════════════════════ */
#global-noise {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
  mix-blend-mode: overlay;
  transition: opacity var(--t2) var(--ease);
}
#global-noise.on { opacity: 0.14; }


/* ═══════════════════════════════════════════════════════════════════════════
   ORBS — blobs mode
═══════════════════════════════════════════════════════════════════════════ */
/* orb-container et .orb supprimés — v10c */


/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════════════════════ */
#s-login {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: #050505;
  transition: opacity var(--t3) var(--ease);
}
#s-login.out { opacity: 0; pointer-events: none; }

.l-noise {
  position: absolute; inset: 0; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px; pointer-events: none;
}
/* .l-orb supprimés — v10c */

/* @keyframes orbFloat supprimé — v10c */

.l-card {
  position: relative; z-index: 1;
  width: min(440px, 90vw); padding: 3.25rem 2.75rem;
  background: var(--ui-faint);
  border: 1px solid var(--ui-ghost);
  border-radius: 1.5rem; backdrop-filter: blur(60px);
  box-shadow: 0 48px 100px rgba(0,0,0,.7), inset 0 1px 0 var(--ui-soft);
  animation: cardIn .9s var(--spring) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.l-wordmark {
  font-family: 'Bebas Neue', sans-serif; font-size: 3rem;
  letter-spacing: .04em; line-height: 1; color: #fff; margin-bottom: 0.375rem;
}
.l-sub {
  font-size: 0.8125rem; color: var(--ui-dim); font-weight: 400;
  margin-bottom: 2.5rem; letter-spacing: .01em;
}

.field { margin-bottom: 1rem; }
.field label {
  display: block; font-size: 0.625rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ui-dim); margin-bottom: 0.4375rem; font-weight: 500;
}
.field input {
  width: 100%; padding: 0.8125rem 1rem;
  background: var(--ui-soft); border: 1px solid var(--ui-ghost);
  border-radius: 0.625rem; color: #fff;
  font-family: 'Instrument Sans', sans-serif; font-size: 0.875rem;
  outline: none;
  transition: border-color var(--t1) var(--ease), background var(--t1) var(--ease), box-shadow var(--t1);
}
.field input::placeholder { color: rgba(255,255,255,.18); }
.field input:focus {
  border-color: rgba(255,255,255,.3); background: var(--ui-soft);
  box-shadow: 0 0 0 3px var(--ui-faint);
}

.l-btn {
  width: 100%; margin-top: 1.625rem; padding: 0.9375rem;
  background: #fff; color: #000; border: none; border-radius: 0.75rem;
  font-family: 'Instrument Sans', sans-serif; font-weight: 600;
  font-size: 0.875rem; letter-spacing: .03em;
  cursor: pointer; transition: transform var(--t1) var(--spring), box-shadow var(--t1);
}
.l-btn:hover  { transform: scale(1.02); box-shadow: 0 8px 28px rgba(255,255,255,.22); }
.l-btn:active { transform: scale(.97); }

.l-cached {
  margin-top: 1.25rem; padding: 0.875rem 1rem;
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: 0.625rem;
  align-items: center; gap: 0.75rem; cursor: pointer;
  transition: background var(--t1); display: none;
}
.l-cached:hover     { background: var(--ui-soft); }
.l-cached-label     { flex: 1; font-size: 0.8125rem; color: var(--ui-mid); }
.l-cached-user      { font-size: 0.8125rem; color: var(--ui-bright); font-weight: 500; }
.l-cached-arrow     { color: var(--ui-dim); font-size: 1rem; }

#l-error { margin-top: 0.75rem; font-size: 0.75rem; color: var(--accent); text-align: center; min-height: 1.125rem; opacity: 0; transition: opacity .3s; }
#l-error.on { opacity: 1; }

/* ── LOGIN — Mode Télécommande ────────────────────────────────────────────── */
.l-rc-divider {
  margin: 1.5rem 0 1rem;
  border: none; border-top: 1px solid var(--ui-ghost);
}
.l-rc-toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: 0.625rem;
  color: var(--ui-dim);
  font-family: 'Instrument Sans', sans-serif; font-size: 0.75rem; font-weight: 500; letter-spacing: .04em;
  cursor: pointer;
  transition: background var(--t1), color var(--t1), border-color var(--t1);
}
.l-rc-toggle:hover, .l-rc-toggle.active { background: var(--ui-soft); color: var(--ui-bright); border-color: rgba(255,255,255,.18); }
.l-rc-toggle svg { flex-shrink: 0; opacity: .6; }

.l-rc-form {
  margin-top: 0.75rem;
  flex-direction: column; gap: 0.5rem;
}
.l-rc-form input {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--ui-soft); border: 1px solid var(--ui-ghost); border-radius: 0.625rem;
  color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 1.125rem;
  text-align: center; letter-spacing: .25em; text-transform: uppercase;
  outline: none;
  transition: border-color var(--t1), box-shadow var(--t1);
}
.l-rc-form input:focus { border-color: rgba(255,255,255,.3); box-shadow: 0 0 0 3px var(--ui-faint); }
.l-rc-form input::placeholder { color: rgba(255,255,255,.15); letter-spacing: .1em; text-transform: none; font-size: .8rem; font-family: 'Instrument Sans', sans-serif; }
.l-rc-connect {
  width: 100%; padding: 0.8125rem;
  background: var(--accent); color: #fff; border: none; border-radius: 0.625rem;
  font-family: 'Instrument Sans', sans-serif; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: opacity var(--t1), transform var(--t1) var(--spring);
}
.l-rc-connect:hover  { opacity: .85; }
.l-rc-connect:active { transform: scale(.97); }
.l-rc-error {
  font-size: 0.7rem; color: var(--accent); text-align: center;
  min-height: 1rem; opacity: 0; transition: opacity .3s;
}


/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER ROOT
═══════════════════════════════════════════════════════════════════════════ */
#s-player {
  position: fixed; inset: 0; z-index: 1;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t3) var(--ease);
}
#s-player.on { opacity: 1; pointer-events: all; }


/* ── BACKGROUND LAYERS (z 1) ───────────────────────────────────────────── */
.bg-layer {
  position: absolute; inset: -80px;
  background-size: cover; background-position: center;
  filter: blur(var(--blur-amount)) saturate(var(--bg-saturate)) brightness(var(--bg-brightness));
  transition: opacity 2s var(--ease); will-change: transform, opacity;
}
#bg-a { z-index: 1; opacity: 1; animation: drift1 28s ease-in-out infinite alternate; }
#bg-b { z-index: 1; opacity: 0; animation: drift2 34s ease-in-out infinite alternate; }

@keyframes drift1 {
  0%   { transform: scale(1.1)  translate(0, 0); }
  33%  { transform: scale(1.16) translate(-18px, 10px); }
  66%  { transform: scale(1.12) translate(12px, -14px); }
  100% { transform: scale(1.18) translate(-10px, 18px); }
}
@keyframes drift2 {
  0%   { transform: scale(1.14) translate(10px, -6px); }
  50%  { transform: scale(1.2)  translate(-14px, 12px); }
  100% { transform: scale(1.12) translate(18px, -10px); }
}

body.bg-legere #bg-a { animation: driftLegere1 70s ease-in-out infinite alternate; }
body.bg-legere #bg-b { animation: driftLegere2 90s ease-in-out infinite alternate; }
@keyframes driftLegere1 {
  0%   { transform: scale(1.05) translate(0px, 0px); }
  50%  { transform: scale(1.07) translate(-6px, 4px); }
  100% { transform: scale(1.06) translate(5px, -5px); }
}
@keyframes driftLegere2 {
  0%   { transform: scale(1.06) translate(4px, -3px); }
  100% { transform: scale(1.08) translate(-5px, 6px); }
}

body.bg-energique #bg-a { animation: driftEnergique1 7s ease-in-out infinite alternate; }
body.bg-energique #bg-b { animation: driftEnergique2 10s ease-in-out infinite alternate; }
@keyframes driftEnergique1 {
  0%   { transform: scale(1.2) translate(-35px, 20px); }
  25%  { transform: scale(1.3) translate(28px, -32px); }
  50%  { transform: scale(1.18) translate(-22px, -25px); }
  75%  { transform: scale(1.28) translate(32px, 28px); }
  100% { transform: scale(1.22) translate(-15px, 32px); }
}
@keyframes driftEnergique2 {
  0%   { transform: scale(1.25) translate(25px, -12px); }
  50%  { transform: scale(1.35) translate(-30px, 22px); }
  100% { transform: scale(1.28) translate(20px, -28px); }
}

body.bg-flottante #bg-a { animation: driftFlottante1 22s ease-in-out infinite; }
body.bg-flottante #bg-b { animation: driftFlottante2 28s ease-in-out infinite; }
@keyframes driftFlottante1 {
  0%   { transform: scale(1.1) translate(0, 0); }
  25%  { transform: scale(1.22) translate(-18px, 12px); }
  50%  { transform: scale(1.15) translate(14px, -18px); }
  75%  { transform: scale(1.24) translate(18px, 14px); }
  100% { transform: scale(1.1) translate(0, 0); }
}
@keyframes driftFlottante2 {
  0%   { transform: scale(1.15) translate(12px, -10px); }
  33%  { transform: scale(1.28) translate(-16px, 18px); }
  66%  { transform: scale(1.2) translate(20px, -12px); }
  100% { transform: scale(1.15) translate(12px, -10px); }
}

.bg-filter   { position: absolute; inset: 0; z-index: 3; background: rgba(0,0,0,.35); transition: background .6s var(--ease); }
.bg-vignette { position: absolute; inset: 0; z-index: 4; background: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 30%, rgba(0,0,0,.62) 100%); }


/* ═══════════════════════════════════════════════════════════════════════════
   MARQUEE (z 4)
═══════════════════════════════════════════════════════════════════════════ */
#mq-wrap {
  position: absolute; inset: 0; z-index: 4;
  display: flex; align-items: center; overflow: hidden;
  pointer-events: none; transition: opacity 0.5s var(--ease);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
#mq {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(120px, 16vw, 240px);
  white-space: nowrap; color: rgba(255,255,255,.03);
  animation: mq var(--mq-speed) linear infinite;
  will-change: transform; user-select: none; letter-spacing: .04em;
}
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
#mq-wrap.hidden-mq { opacity: 0; }


/* ═══════════════════════════════════════════════════════════════════════════
   HERO (z 5)
═══════════════════════════════════════════════════════════════════════════ */
#hero {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 0 2rem;
  transition: transform var(--t3) var(--ease), opacity var(--t2) var(--ease);
}
#hero.shifted { transform: translateX(-20%); }

#track-content {
  display: flex; flex-direction: column; align-items: center;
  transition: opacity var(--t2) var(--ease), transform 0.6s var(--snap);
  transform: scale(var(--hero-scale));
  transform-origin: center center;
  will-change: transform;
}

body.hero-left  #hero { align-items: flex-start; text-align: left;  padding-left: 5rem; }
body.hero-right #hero { align-items: flex-end;   text-align: right; padding-right: 5rem; }
body.hero-left  #artist-row    { justify-content: flex-start; }
body.hero-right #artist-row    { justify-content: flex-end; }
body.hero-left  #track-content { align-items: flex-start; }
body.hero-right #track-content { align-items: flex-end; }

body.hero-minimal .art-wrap,
body.hero-minimal #artist-row,
body.hero-minimal #eq-viz,
body.hero-minimal #viz-canvas { display: none !important; }
body.hero-minimal #track-title {
  font-size: clamp(1.5rem, 3.5vw, 3.25rem);
  margin-bottom: 0.5rem;
}
body.hero-minimal #progress-container {
  display: block !important;
  width: clamp(280px, 52vw, 640px);
  margin-top: 0.75rem;
}

/* contour Lanyard supprimé */


/* ── WAITING STATE ──────────────────────────────────────────────────────── */
#no-track { display: none; flex-direction: column; align-items: center; gap: 1.125rem; text-align: center; }
#no-track.on { display: flex; }

.nm-wave-container { display: flex; align-items: flex-end; gap: 5px; height: 52px; }
.nm-bar {
  width: 5px; border-radius: 3px;
  background: linear-gradient(to top, var(--ui-soft), rgba(255,255,255,.18));
  animation: nmWave 1.4s ease-in-out infinite alternate;
}
.nm-bar:nth-child(1) { height: 18px; animation-delay: 0s; }
.nm-bar:nth-child(2) { height: 30px; animation-delay: .1s; }
.nm-bar:nth-child(3) { height: 42px; animation-delay: .2s; }
.nm-bar:nth-child(4) { height: 52px; animation-delay: .3s; }
.nm-bar:nth-child(5) { height: 38px; animation-delay: .2s; }
.nm-bar:nth-child(6) { height: 24px; animation-delay: .1s; }
.nm-bar:nth-child(7) { height: 14px; animation-delay: 0s; }

@keyframes nmWave {
  from { transform: scaleY(.25); opacity: .2; }
  to   { transform: scaleY(1);   opacity: .5; }
}

.nt-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem;
  color: rgba(255,255,255,.22); letter-spacing: .05em;
  animation: waitPulse 3s ease-in-out infinite;
}
@keyframes waitPulse { 0%, 100% { opacity: .22; } 50% { opacity: .45; } }
.nt-sub { font-size: 0.6875rem; color: rgba(255,255,255,.1); letter-spacing: .08em; text-transform: uppercase; }


/* ═══════════════════════════════════════════════════════════════════════════
   ALBUM WRAPPER + CONTEXT MENU
═══════════════════════════════════════════════════════════════════════════ */
.album-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* ── ALBUM ART ─────────────────────────────────────────────────────────── */
.art-wrap {
  position: relative;
  width: clamp(180px, 22vw, 300px);
  height: clamp(180px, 22vw, 300px);
  flex-shrink: 0;
  transition: border-radius .4s var(--ease);
}

@keyframes artFloat {
  0%   { transform: translateY(0px)  rotate(0deg)   scale(1); }
  30%  { transform: translateY(-7px) rotate(0.4deg) scale(1.012); }
  60%  { transform: translateY(-4px) rotate(-0.3deg) scale(1.006); }
  100% { transform: translateY(0px)  rotate(0deg)   scale(1); }
}
body.album-anim.is-playing .art-wrap:not(.vinyl) {
  animation: artFloat 7s ease-in-out infinite;
}

/* ─────────────────────────────────────────────────────────────────────────
   [NEW] ART GLOW PULSÉ (Premium) — body.art-glow-pulse
   ───────────────────────────────────────────────────────────────────────── */
@keyframes artGlowPulse {
  0%, 100% {
    opacity: 0.45;
    filter: blur(36px);
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    filter: blur(22px);
    transform: scale(1.06);
  }
}

body.art-glow-pulse .art-glow {
  animation: artGlowPulse 2.8s ease-in-out infinite !important;
  opacity: 0.7 !important;
}

.art-glow {
  position: absolute; inset: -24px; z-index: -1;
  border-radius: 60px; opacity: .5;
  background-size: cover; background-position: center;
  filter: blur(36px);
  transition: background-image 1.8s var(--ease), opacity .6s, background-color 1.8s;
}
.art-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: var(--art-radius); object-fit: cover;
  box-shadow: 0 32px 72px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.07);
  transition: opacity var(--t3) var(--ease), border-radius .4s var(--ease);
  will-change: opacity;
}
#art-a { opacity: 1; }
#art-b { opacity: 0; }

.fallback-art {
  position: absolute; inset: 0; border-radius: var(--art-radius);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 10vw, 120px);
  color: rgba(255,255,255,.75); letter-spacing: .05em;
  transition: opacity var(--t3) var(--ease), border-radius .4s var(--ease);
  will-change: opacity; opacity: 0;
  box-shadow: 0 32px 72px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.07);
}

/* ── CONTEXT MENU ───────────────────────────────────────────────────────── */
.album-ctx-menu {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 10;
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(10,10,12,0.82);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 8px 32px rgba(0,0,0,.55), inset 0 0 0 0.5px rgba(255,255,255,.06);
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--spring);
  will-change: opacity, transform;
}
.album-wrapper:hover .album-ctx-menu {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
body.is-idle .album-ctx-menu,
body.zen-mode .album-ctx-menu { opacity: 0 !important; pointer-events: none !important; }

.ctx-btn {
  min-width: 44px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 8px 10px; border-radius: 10px;
  background: transparent; border: none; color: var(--ui-mid);
  cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), transform .15s var(--spring);
}
.ctx-btn:hover  { background: var(--ui-soft); color: #fff; transform: scale(1.08); }
.ctx-btn:active { transform: scale(.93); }
.ctx-btn svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.ctx-btn-label {
  font-size: 0.5625rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1;
}
#ctx-btn-lastfm { color: rgba(212,2,49,0.7); }
#ctx-btn-lastfm:hover { color: #D40231; background: rgba(212,2,49,0.12); }


/* ═══════════════════════════════════════════════════════════════════════════
   TRACK TEXT + MARQUEE TITLE
═══════════════════════════════════════════════════════════════════════════ */
.fade-up-text {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--spring);
}
.fade-up-text.show { opacity: 1; transform: translateY(0); }

.track-title-wrap {
  max-width: min(72vw, 720px);
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

#track-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 7vw, 6.75rem);
  line-height: .95; letter-spacing: .03em; color: #fff;
  margin-bottom: 0.75rem;
  text-shadow: var(--text-shadow-legible);
  white-space: nowrap;
  display: inline-block;
}

/* Adaptive text color handled by body.lyrics-light-text block in LRC section */

@keyframes titleMarquee {
  0%, 10%   { transform: translateX(0); }
  45%, 55%  { transform: translateX(var(--title-overflow, -40%)); }
  90%, 100% { transform: translateX(0); }
}
#track-title.scrolling {
  animation: titleMarquee 10s ease-in-out infinite;
  animation-delay: 1.5s;
}

#artist-row { display: flex; align-items: center; justify-content: center; gap: 0.625rem; }

#track-artist {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: clamp(1.125rem, 2.2vw, 2rem);
  color: var(--ui-mid);
  letter-spacing: .01em;
  text-shadow: var(--text-shadow-legible);
  max-width: 50vw;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── ARTIST AVATAR ──────────────────────────────────────────────────────── */
.avatar-circle {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.2); overflow: hidden; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.4); background: var(--ui-soft);
  opacity: 0;
  transition: opacity var(--t2) var(--ease) 0.4s, transform .3s var(--spring) 0.4s;
  transform: scale(0.85);
}
.avatar-circle.on { opacity: 1; transform: scale(1); }
.avatar-circle:hover { transform: scale(1.1); }

.avatar-circle img#artist-avatar {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; opacity: 0;
  transition: opacity var(--t2) var(--ease);
}
.avatar-circle img#artist-avatar.loaded { opacity: 1; }

.avatar-fallback {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif; font-size: 1rem;
  color: rgba(255,255,255,.75); letter-spacing: .05em;
  transition: opacity var(--t2) var(--ease);
}


/* ── PROGRESS BAR ───────────────────────────────────────────────────────── */
#progress-container {
  width: clamp(200px, 40vw, 500px); height: 4px;
  background: var(--ui-ghost); border-radius: 10px;
  margin-top: 1.25rem; position: relative; overflow: hidden; display: none;
}
#progress-bar {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: var(--accent); transition: width 1s linear;
}
body.show-progress #progress-container { display: block; }


/* ── SUB-STATS (plays sous le titre) ──────────────────────────────────── */
/* #sub-stats — see bottom of file for full v10 definition */

/* ── EQ BARS ────────────────────────────────────────────────────────────── */
#eq-viz { display: none; align-items: flex-end; justify-content: center; gap: 3px; height: 26px; margin-top: 1rem; }
body.show-eq #eq-viz { display: flex; }

.eq-bar {
  width: 3px; border-radius: 3px 3px 1px 1px;
  background: var(--accent); transform-origin: bottom center;
  box-shadow: 0 0 6px var(--accent);
}
.eq-bar:nth-child(1) { height: 10px; animation: eqB .55s ease-in-out infinite alternate; }
.eq-bar:nth-child(2) { height: 18px; animation: eqB .75s ease-in-out infinite alternate; animation-delay: .07s; }
.eq-bar:nth-child(3) { height: 24px; animation: eqB .5s  ease-in-out infinite alternate; animation-delay: .04s; }
.eq-bar:nth-child(4) { height: 16px; animation: eqB .65s ease-in-out infinite alternate; animation-delay: .12s; }
.eq-bar:nth-child(5) { height: 12px; animation: eqB .85s ease-in-out infinite alternate; animation-delay: .09s; }
.eq-bar:nth-child(6) { height: 20px; animation: eqB .6s  ease-in-out infinite alternate; animation-delay: .03s; }
.eq-bar:nth-child(7) { height: 9px;  animation: eqB .7s  ease-in-out infinite alternate; animation-delay: .14s; }

@keyframes eqB {
  from { transform: scaleY(.2); opacity: .5; }
  to   { transform: scaleY(1);  opacity: 1; }
}
body:not(.is-playing) .eq-bar { animation-play-state: paused; transform: scaleY(.2); opacity: .3; }
body.is-playing        .eq-bar { animation-play-state: running; }


/* ── CANVAS SPECTRUM ────────────────────────────────────────────────────── */
#viz-canvas {
  display: none; margin-top: 1rem; border-radius: 8px; opacity: .85;
  width: 320px; height: 48px; max-width: 60vw;
}
body.show-canvas-viz #viz-canvas { display: block; }


/* ═══════════════════════════════════════════════════════════════════════════
   VINYL MODE
═══════════════════════════════════════════════════════════════════════════ */
@keyframes vinylSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.art-wrap.vinyl .art-img,
.art-wrap.vinyl .fallback-art {
  border-radius: 50% !important;
  animation: vinylSpin 1.82s linear infinite;
  animation-play-state: paused;
}
.art-wrap.vinyl .art-glow { border-radius: 50%; }
.art-wrap.vinyl.playing .art-img,
.art-wrap.vinyl.playing .fallback-art { animation-play-state: running; }

.vinyl-grooves {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, transparent 0px, transparent 5px, rgba(0,0,0,.18) 5px, rgba(0,0,0,.18) 6px);
  pointer-events: none; z-index: 3; opacity: 0; transition: opacity .4s var(--ease);
}
.art-wrap.vinyl .vinyl-grooves { opacity: 1; }

.vinyl-center {
  position: absolute; width: 18%; height: 18%;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #2a2a2a 60%, #111 100%);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 1px rgba(0,0,0,.5);
  pointer-events: none; z-index: 4; opacity: 0; transition: opacity .4s var(--ease);
}
.art-wrap.vinyl .vinyl-center { opacity: 1; }

.tonearm-wrap {
  position: absolute; top: -20px; right: -30px;
  width: 70px; height: 110px;
  transform-origin: 72% 12%; transform: rotate(-28deg);
  pointer-events: none; z-index: 10; opacity: 0;
  transition: opacity .4s var(--ease), transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.art-wrap.vinyl .tonearm-wrap { opacity: 1; }
.art-wrap.vinyl.playing .tonearm-wrap { transform: rotate(-6deg); }

.tonearm-pivot { position: absolute; top: 0; right: 4px; width: 13px; height: 13px; border-radius: 50%; background: linear-gradient(135deg, #ccc, #888); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.tonearm-arm   { position: absolute; top: 6px; right: 9px; width: 2.5px; height: 92px; background: linear-gradient(to bottom, rgba(210,210,210,.9), rgba(140,140,140,.5)); border-radius: 2px; transform-origin: top center; transform: rotate(-6deg); }
.tonearm-head  { position: absolute; bottom: 0; right: 3px; width: 10px; height: 6px; background: rgba(180,180,180,.75); border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }


/* ═══════════════════════════════════════════════════════════════════════════
   APPLE MUSIC MODE (UI style)
═══════════════════════════════════════════════════════════════════════════ */
body.mode-apple #hero         { transition: all 0.8s var(--ease); }
body.mode-apple .art-img      { border-radius: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
body.mode-apple #track-title  { font-family: 'Inter', sans-serif !important; font-weight: 700; letter-spacing: -0.02em; font-size: clamp(2rem, 5vw, 4rem); }
body.mode-apple #track-artist { font-family: 'Inter', sans-serif !important; font-style: normal; opacity: .8; }


/* ═══════════════════════════════════════════════════════════════════════════
   LYRICS PANEL (z 6)
═══════════════════════════════════════════════════════════════════════════ */
#lyrics-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 38%; z-index: 6;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem 2.75rem 3rem 2rem;
  transform: translateX(102%); opacity: 0;
  transition: transform var(--t3) var(--ease), opacity var(--t3) var(--ease),
              backdrop-filter .5s var(--ease), background .5s var(--ease);
  pointer-events: none;
  overflow: hidden;
}
#lyrics-panel.on { transform: translateX(0); opacity: 1; pointer-events: all; }

/* ─────────────────────────────────────────────────────────────────────────
   LYRICS POSITION MODES
   Default = right (panel slides from right, hero shifts left)
   ───────────────────────────────────────────────────────────────────────── */

/* CENTER — floating panel centered over hero */
body.lyrics-pos-center #lyrics-panel {
  right: auto; top: 50%; bottom: auto;
  left: 50%;
  width: min(62vw, 640px);
  max-height: 80vh;
  padding: 2.5rem 3rem;
  border-radius: 28px;
  transform: translateX(-50%) translateY(calc(-50% + 24px)) scale(0.94);
  opacity: 0;
  background: rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(48px) saturate(1.8);
  -webkit-backdrop-filter: blur(48px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 32px 80px rgba(0,0,0,0.55);
}
body.lyrics-pos-center #lyrics-panel.on {
  transform: translateX(-50%) translateY(-50%) scale(1);
  opacity: 1;
}
/* Center mode: hero never shifts */
body.lyrics-pos-center #hero.shifted { transform: none !important; }

/* BOTTOM — horizontal strip at the bottom */
body.lyrics-pos-bottom #lyrics-panel {
  right: 0; left: 0; bottom: 0; top: auto;
  width: 100%; height: 38vh;
  padding: 1.5rem clamp(2rem, 8vw, 8rem) 2rem;
  justify-content: flex-start;
  transform: translateY(104%);
  opacity: 0;
  background: rgba(0,0,0,0.4) !important;
  backdrop-filter: blur(40px) saturate(1.6);
  -webkit-backdrop-filter: blur(40px) saturate(1.6);
  border-top: 1px solid rgba(255,255,255,0.07);
  border-radius: 0;
}
body.lyrics-pos-bottom #lyrics-panel.on {
  transform: translateY(0);
  opacity: 1;
}
/* Bottom mode: hero never shifts sideways */
body.lyrics-pos-bottom #hero.shifted { transform: none !important; }
/* Fade mask direction flipped for bottom strip */
body.lyrics-pos-bottom .lrc-fade-mask {
  mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}
body.lyrics-pos-bottom .lp-body { max-height: 30vh; }
body.lyrics-pos-bottom #lrc-container { padding: 12vh 0.5rem 16vh; }

/* Standard blur — saturate intentionally omitted; JS applies inline only when blur > 0 */
#lyrics-panel.lyrics-blur-standard {
  background: transparent;
}

/* [v8] Lyrics panel background modes */
#lyrics-panel.lbg-none   { background: transparent !important; border-left: none !important; }
#lyrics-panel.lbg-dark   { background: var(--lyrics-custom-bg) !important; }
#lyrics-panel.lbg-custom { background: var(--lyrics-custom-bg) !important; }
#lyrics-panel.lbg-auto   { background: var(--lyrics-custom-bg) !important; }

/* Apple Music blur — saturate omitted; JS applies inline only when blur > 0 */
#lyrics-panel.lyrics-blur-apple {
  background: transparent;
}

#lyrics-panel.lyrics-blur-apple::before {
  content: '';
  position: absolute;
  inset: -40px;
  z-index: -1;
  border-radius: 40px;
  background:
    radial-gradient(ellipse at 20% 20%, var(--accent) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(79,172,254,0.7) 0%, transparent 55%),
    radial-gradient(ellipse at 55% 45%, rgba(118,75,162,0.55) 0%, transparent 65%);
  filter: blur(50px);
  opacity: 0.55;
  animation: appleLyricsMove 9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes appleLyricsMove {
  0%   { transform: scale(1.0) translate(0%,   0%); opacity: 0.45; }
  20%  { transform: scale(1.12) translate(4%, -6%); opacity: 0.60; }
  40%  { transform: scale(1.06) translate(-5%, 8%); opacity: 0.50; }
  60%  { transform: scale(1.15) translate(7%,  4%); opacity: 0.68; }
  80%  { transform: scale(1.08) translate(-3%,-5%); opacity: 0.55; }
  100% { transform: scale(1.0) translate(5%,   3%); opacity: 0.45; }
}

.lp-header-row { display: none; }
.lp-badge { display: none; }

.lp-body {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: calc(clamp(0.9375rem, 1.3vw, 1.125rem) * var(--lyrics-size));
  line-height: 2.0; color: var(--ui-mid);
  overflow-y: auto;
  max-height: 76vh;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.10) transparent;
  position: relative;
}
.lp-body::-webkit-scrollbar       { width: 2px; }
.lp-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 2px; }
.lp-body::-webkit-scrollbar-track { background: transparent; }

.lp-body.lrc-mode { overflow: hidden; }

.lrc-fade-mask {
  display: block; width: 100%;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.lp-empty {
  font-size: 0.8125rem; color: var(--ui-dim); font-style: normal; line-height: 1.8;
  text-shadow: var(--text-shadow-legible);
}

#lrc-container {
  padding: 28vh 1rem 40vh;
  will-change: transform;
  transition: transform 0.55s var(--snap);
}

/* ─────────────────────────────────────────────────────────────────────────
   LRC LINES — uses parameterised shadow + adaptive text color
   ───────────────────────────────────────────────────────────────────────── */
.lrc-line {
  padding: 0.5rem 0;
  font-style: italic;
  text-align: center;
  color: var(--lyrics-inactive-color);
  filter: blur(0.8px);
  opacity: .3;
  transform: scale(.96);
  transform-origin: center center;
  transition: opacity .4s var(--ease), filter .4s var(--ease), color .4s var(--ease), transform .35s var(--spring);
  cursor: pointer; line-height: var(--lyrics-line-height, 1.8); white-space: pre-wrap;
  text-shadow: var(--text-shadow-legible);
  font-weight: var(--lyrics-weight, 400);
  letter-spacing: var(--lyrics-letter-spacing, 0em);
}
.lrc-line.active {
  color: var(--lyrics-active-color);
  filter: blur(0); opacity: 1; transform: scale(1.04);
  text-shadow: 0 0 20px color-mix(in srgb, var(--lyrics-active-color) 40%, transparent), var(--text-shadow-legible);
}
.lrc-line.near { opacity: .55; filter: blur(0.3px); color: var(--lyrics-near-color); }

/* === LYRICS ANIMATION STYLES === */
/* fade (default) */
body.lrc-anim-fade .lrc-line {
  transition: opacity .4s var(--ease), filter .4s var(--ease), color .4s var(--ease), transform .35s var(--spring);
}

/* slide */
body.lrc-anim-slide .lrc-line {
  transition: opacity .35s var(--ease), filter .35s var(--ease), color .35s var(--ease), transform .35s var(--spring);
}
body.lrc-anim-slide .lrc-line.active {
  transform: scale(1.04) translateX(4px);
}
body.lrc-anim-slide .lrc-line:not(.active) {
  transform: scale(.96) translateX(-2px);
}

/* scale */
body.lrc-anim-scale .lrc-line {
  transition: opacity .3s var(--ease), filter .3s var(--ease), color .3s var(--ease), transform .3s var(--spring);
}
body.lrc-anim-scale .lrc-line:not(.active) { transform: scale(.82); opacity: .2; }
body.lrc-anim-scale .lrc-line.active       { transform: scale(1.1); }
body.lrc-anim-scale .lrc-line.near         { transform: scale(.92); }

/* blur */
body.lrc-anim-blur .lrc-line {
  transition: opacity .4s var(--ease), filter .5s var(--ease), color .4s var(--ease), transform .35s var(--spring);
}
body.lrc-anim-blur .lrc-line:not(.active) { filter: blur(3px); }
body.lrc-anim-blur .lrc-line.active       { filter: blur(0) drop-shadow(0 0 8px var(--lyrics-active-color)); }
body.lrc-anim-blur .lrc-line.near         { filter: blur(1px); }

/* bounce */
body.lrc-anim-bounce .lrc-line {
  transition: opacity .3s var(--ease), filter .3s var(--ease), color .3s var(--ease), transform .45s var(--spring);
}
body.lrc-anim-bounce .lrc-line.active {
  transform: scale(1.07) translateY(-3px);
  animation: lrcBounce .5s var(--spring) both;
}
@keyframes lrcBounce {
  0%   { transform: scale(.96) translateY(0); }
  40%  { transform: scale(1.1) translateY(-6px); }
  70%  { transform: scale(1.03) translateY(-1px); }
  100% { transform: scale(1.07) translateY(-3px); }
}

/* none */
body.lrc-anim-none .lrc-line {
  transition: color .2s var(--ease) !important;
  filter: none !important;
  transform: none !important;
}
body.lrc-anim-none .lrc-line.active { opacity: 1; transform: none !important; }

body.lyrics-anim-off .lrc-line {
  transition: none !important;
  filter: none !important;
}

/* [NEW] Adaptive light-text mode — light backgrounds */
body.lyrics-light-text .lrc-line       { color: rgba(0,0,0,0.22); }
body.lyrics-light-text .lrc-line.near  { color: rgba(0,0,0,0.50); }
body.lyrics-light-text .lrc-line.active {
  color: var(--lyrics-active-color);
  text-shadow: 0 0 18px rgba(0,0,0,.2), var(--text-shadow-legible);
}
body.lyrics-light-text #track-title  { color: #111; }
body.lyrics-light-text #track-artist { color: rgba(0,0,0,0.65); }

/* Lyrics font variants */
body.lf-sans    .lp-body,
body.lf-sans    .lrc-line { font-family: 'Instrument Sans', sans-serif !important; font-style: normal; }
body.lf-mono    .lp-body,
body.lf-mono    .lrc-line { font-family: 'JetBrains Mono', monospace !important; font-style: normal; }
body.lf-display .lp-body,
body.lf-display .lrc-line { font-family: 'Bebas Neue', sans-serif !important; font-style: normal; letter-spacing: .06em; }

.plain-lyrics {
  white-space: pre-wrap; line-height: 2;
  color: rgba(255,255,255,.65); font-style: italic;
  text-shadow: var(--text-shadow-legible);
}


/* ═══════════════════════════════════════════════════════════════════════════
   HISTORY PANEL (z 6)
═══════════════════════════════════════════════════════════════════════════ */
#hist-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 38%; z-index: 6;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem 2.75rem 3rem 2rem;
  transform: translateX(102%); opacity: 0;
  transition: transform var(--t3) var(--ease), opacity var(--t3) var(--ease);
  pointer-events: none;
}
#hist-panel.on { transform: translateX(0); opacity: 1; pointer-events: all; }

.hp-label {
  font-size: 0.625rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ui-dim); font-weight: 500;
  margin-bottom: 1.5rem;
  text-shadow: var(--text-shadow-legible);
}
.hp-list {
  display: flex; flex-direction: column; gap: 1rem;
  overflow-y: auto; max-height: 70vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}
.hp-list::-webkit-scrollbar       { width: 2px; }
.hp-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 2px; }
.hp-list::-webkit-scrollbar-track { background: transparent; }

.hp-item {
  display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 1rem;
  background: var(--ui-faint); border: 1px solid rgba(255,255,255,.07); border-radius: 12px;
  transition: background var(--t1), transform var(--t1) var(--spring);
}
.hp-item:hover { background: var(--ui-soft); transform: translateX(2px); }
.hp-thumb  { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--ui-soft); }
.hp-info   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hp-track  {
  font-size: 0.8125rem; font-weight: 500; color: var(--ui-bright);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: var(--text-shadow-legible);
}
.hp-artist {
  font-size: 0.6875rem; color: var(--ui-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-shadow: var(--text-shadow-legible);
}
.hp-time    { font-size: 0.625rem; color: var(--ui-dim); font-family: 'Instrument Sans', sans-serif; }
.hp-playing {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0; animation: blink 1.5s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS PANEL (z 7)
═══════════════════════════════════════════════════════════════════════════ */
#settings-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 360px; z-index: 7;
  display: flex; flex-direction: column;
  background: rgba(8,8,10,.97);
  border-left: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(40px);
  transform: translateX(102%); opacity: 0;
  transition: transform var(--t3) var(--ease), opacity var(--t3) var(--ease);
  pointer-events: none; overflow: hidden;
}
#settings-panel.on { transform: translateX(0); opacity: 1; pointer-events: all; z-index: 10000; }

.sp-header {
  flex-shrink: 0; padding: 2rem 1.75rem 0;
  background: rgba(8,8,10,.97);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sp-title { font-family: 'Bebas Neue', sans-serif; font-size: 1.75rem; letter-spacing: .08em; color: #fff; margin-bottom: 1.25rem; }

.sp-tabs {
  display: flex; gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tab {
  flex: 0 0 auto; padding: 0.625rem 0.6rem;
  min-height: 44px;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--ui-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.5rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease), transform .15s var(--spring);
  border-radius: 6px 6px 0 0;
}
.sp-tab:hover  { color: rgba(255,255,255,.7); background: var(--ui-faint); }
.sp-tab:active { transform: scale(.95); }
.sp-tab.active { color: #fff; border-bottom-color: var(--accent); background: transparent; }

.sp-tab-pane {
  display: none; overflow-y: auto; flex: 1;
  padding: 1.5rem 1.75rem 3rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
}
.sp-tab-pane.active { display: block; }
.sp-tab-pane::-webkit-scrollbar       { width: 2px; }
.sp-tab-pane::-webkit-scrollbar-thumb { background: rgba(255,255,255,.10); border-radius: 2px; }
.sp-tab-pane::-webkit-scrollbar-track { background: transparent; }

.sp-section { margin-bottom: 1.625rem; }
.sp-section-label {
  font-size: 0.5625rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ui-dim); font-weight: 600;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; gap: 7px;
}
.sp-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.sp-row-label { font-size: 0.8125rem; color: var(--ui-mid); text-shadow: var(--text-shadow-legible); }

.sp-layout-desc {
  margin-top: 0.625rem; padding: 0.5625rem 0.75rem;
  background: var(--ui-faint); border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; font-size: 0.6875rem; color: var(--ui-dim); line-height: 1.5;
  transition: all .3s;
}

.sp-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.08);
  margin: 0.25rem 0 1.375rem; display: block;
}

.sp-priority-info  { font-size: 0.75rem; color: var(--ui-dim); line-height: 1.5; margin-bottom: 0.5rem; }
.sp-priority-desc  {
  margin-top: 0.25rem; padding: 0.5rem 0.75rem;
  background: var(--ui-faint); border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px; font-size: 0.6875rem; color: var(--ui-dim); line-height: 1.5;
  transition: all .3s;
}

.sp-slider-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem; color: var(--ui-mid);
  margin-left: auto; font-weight: 400; letter-spacing: 0;
}

.user-search-wrap { position: relative; }
.user-search-input {
  width: 100%; padding: 0.75rem 1rem;
  background: var(--ui-soft); border: 1px solid var(--ui-ghost);
  border-radius: 0.625rem; color: #fff; font-size: 0.8125rem; outline: none;
  transition: all .3s; font-family: 'Instrument Sans', sans-serif;
}
.user-search-input::placeholder { color: rgba(255,255,255,.2); }
.user-search-input:focus { border-color: var(--accent); background: var(--ui-soft); }

.lanyard-connect-wrap { display: flex; gap: 8px; align-items: stretch; }
.lanyard-connect-wrap .user-search-input { flex: 1; padding: 0.6875rem 0.875rem; }

.lanyard-connect-btn {
  flex-shrink: 0; min-height: 44px; padding: 0 1rem;
  background: rgba(29,185,84,.14); border: 1px solid rgba(29,185,84,.28);
  border-radius: 10px; color: #1DB954;
  font-family: 'Instrument Sans', sans-serif; font-size: 0.75rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s var(--spring), box-shadow .2s;
}
.lanyard-connect-btn:hover   { background: rgba(29,185,84,.25); transform: scale(1.03); box-shadow: 0 4px 14px rgba(29,185,84,.2); }
.lanyard-connect-btn:active  { transform: scale(.97); }
.lanyard-connect-btn.connected { background: rgba(224,36,94,.14); border-color: rgba(224,36,94,.28); color: var(--accent); }


/* ── TOGGLE SWITCH ──────────────────────────────────────────────────────── */
.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0; border-radius: 11px;
  background: var(--ui-ghost); border: 1px solid rgba(255,255,255,.12);
  cursor: pointer; transition: background var(--t1), border-color var(--t1);
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 14px; height: 14px; border-radius: 50%; background: #fff;
  transition: transform var(--t1) var(--spring), box-shadow var(--t1);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); box-shadow: 0 2px 6px rgba(0,0,0,.4); }


/* ── SLIDER ─────────────────────────────────────────────────────────────── */
.sp-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 3px; border-radius: 2px;
  background: linear-gradient(to right, rgba(255,255,255,.6) var(--pct, 50%), rgba(255,255,255,.12) var(--pct, 50%));
  outline: none; cursor: pointer; margin-top: 0.5rem;
}
.sp-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.5);
  transition: transform .15s var(--spring);
}
.sp-slider:hover::-webkit-slider-thumb { transform: scale(1.2); }
.sp-slider-label { display: flex; justify-content: space-between; font-size: 0.6875rem; color: var(--ui-dim); margin-top: 0.375rem; }


/* ── OPTION GROUP ───────────────────────────────────────────────────────── */
.sp-option-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.sp-option {
  padding: 7px 14px; min-height: 36px;
  border-radius: 8px;
  background: var(--ui-soft); border: 1px solid var(--ui-ghost);
  font-size: 0.75rem; color: var(--ui-mid); cursor: pointer;
  font-family: 'Instrument Sans', sans-serif;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .15s var(--spring);
}
.sp-option:hover  { background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.2); transform: scale(1.03); }
.sp-option:active { transform: scale(.95); }
.sp-option.active { background: rgba(255,255,255,.9); color: #000; border-color: transparent; font-weight: 500; }

/* Glow pulse row — greyed out when main glow is off */
#sp-glow-pulse-row { transition: opacity var(--t2) var(--ease); }

.sp-fps-row { align-items: center; display: none; }
.sp-fps-row.fps-visible { display: flex; }
.sp-fps-group { margin-top: 0; gap: 6px; }
.sp-fps-group .sp-option { padding: 5px 11px; font-size: 0.6875rem; border-radius: 7px; }

.sp-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sp-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s var(--spring), border-color .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.sp-swatch:hover  { transform: scale(1.18); }
.sp-swatch:active { transform: scale(.92); }
.sp-swatch.active { border-color: rgba(255,255,255,.7); }

.sp-logout {
  margin-top: 1.25rem; padding: 0.8125rem; width: 100%;
  background: rgba(224,36,94,.1); border: 1px solid rgba(224,36,94,.2);
  border-radius: 10px; color: var(--accent);
  font-family: 'Instrument Sans', sans-serif; font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; transition: background var(--t1), border-color var(--t1), transform .15s var(--spring);
  min-height: 44px;
}
.sp-logout:hover  { background: rgba(224,36,94,.18); border-color: rgba(224,36,94,.35); }
.sp-logout:active { transform: scale(.97); }

.sp-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.sp-shortcut  { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--ui-faint); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
.sp-key       { font-family: 'JetBrains Mono', monospace; font-size: 0.6875rem; padding: 2px 7px; border-radius: 5px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.8); flex-shrink: 0; }
.sp-key-label { font-size: 0.6875rem; color: var(--ui-dim); }


/* ═══════════════════════════════════════════════════════════════════════════
   LANYARD / AURA SYNC STATUS
   [NOTE] btn-lanyard-status & .lanyard-badge removed — button suppressed.
═══════════════════════════════════════════════════════════════════════════ */
.aura-sync-desc { font-size: 0.75rem; color: var(--ui-dim); line-height: 1.6; margin-bottom: 0.625rem; }

.lanyard-status-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 0.625rem; padding: 8px 10px;
  background: var(--ui-faint); border: 1px solid rgba(255,255,255,.07); border-radius: 8px;
}
.lanyard-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.15); transition: background .3s, box-shadow .3s;
}
.lanyard-dot.connecting { background: #f59e0b; box-shadow: 0 0 7px #f59e0b; animation: blink 1s ease-in-out infinite; }
.lanyard-dot.connected  { background: #1DB954; box-shadow: 0 0 7px #1DB954; }
.lanyard-dot.no-music   { background: #f59e0b; box-shadow: 0 0 5px #f59e0b; }
.lanyard-dot.error      { background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.lanyard-dot.test       { background: #f97316; box-shadow: 0 0 7px #f97316; animation: blink 1.8s ease-in-out infinite; }

/* ── Bouton Mode Test ──────────────────────────────────────────────────────── */
.btn-test-mode {
  width: 100%; padding: 0.875rem 1rem; min-height: 44px;
  background: rgba(249,115,22,.10);
  border: 1px solid rgba(249,115,22,.28);
  border-radius: 10px;
  color: #f97316;
  font-family: 'Instrument Sans', sans-serif; font-size: 0.8125rem; font-weight: 600;
  cursor: pointer; letter-spacing: .02em;
  transition: background var(--t1), border-color var(--t1), transform .15s var(--spring), box-shadow var(--t1);
}
.btn-test-mode:hover  { background: rgba(249,115,22,.20); border-color: rgba(249,115,22,.45); box-shadow: 0 4px 16px rgba(249,115,22,.15); }
.btn-test-mode:active { transform: scale(.97); }
.btn-test-mode.test-active {
  background: rgba(249,115,22,.22);
  border-color: rgba(249,115,22,.55);
  box-shadow: 0 0 18px rgba(249,115,22,.2);
  animation: testGlow 2s ease-in-out infinite alternate;
}
@keyframes testGlow {
  from { box-shadow: 0 0 10px rgba(249,115,22,.15); }
  to   { box-shadow: 0 0 24px rgba(249,115,22,.35); }
}

#lanyard-status-text { font-size: 0.6875rem; color: var(--ui-dim); flex: 1; transition: color .3s; }

.lanyard-ws-badge {
  font-size: 0.5rem; font-family: 'JetBrains Mono', monospace; letter-spacing: .1em;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(29,185,84,.18); border: 1px solid rgba(29,185,84,.3);
  color: #1DB954; font-weight: 600; animation: blink 2s ease-in-out infinite;
}

.lanyard-help {
  margin-top: 0.75rem; padding: 0.625rem 0.75rem;
  background: rgba(29,185,84,.06); border: 1px solid rgba(29,185,84,.15);
  border-radius: 8px; font-size: 0.6875rem; line-height: 1.7; color: var(--ui-dim);
}
.lanyard-help strong { color: rgba(255,255,255,.5); }
.lanyard-help em     { color: rgba(255,255,255,.4); }


/* ═══════════════════════════════════════════════════════════════════════════
   UI OVERLAY (z 8)
═══════════════════════════════════════════════════════════════════════════ */
#ui {
  position: fixed; inset: 0; z-index: 8;
  pointer-events: none;
  transition: opacity .6s var(--ease), filter .6s var(--ease);
}
#ui.hidden { opacity: 0; }
#ui > * { pointer-events: all; }

.top-bar     { position: absolute; top: 0; left: 0; right: 0; padding: 1.75rem 2rem; display: flex; align-items: center; justify-content: flex-end; }
.top-actions { display: flex; align-items: center; gap: 0.625rem; }

.btn-pill {
  padding: 8px 18px; min-height: 44px;
  border-radius: 100px;
  background: var(--ui-soft); border: 1px solid rgba(255,255,255,.15);
  color: var(--ui-mid);
  font-family: 'Instrument Sans', sans-serif; font-weight: 500;
  font-size: 0.75rem; letter-spacing: .04em;
  cursor: pointer; backdrop-filter: blur(12px);
  transition: background var(--t1), color var(--t1), transform var(--t1) var(--spring), border-color var(--t1), opacity var(--t2) var(--ease);
  will-change: transform;
}
.btn-pill:hover  { background: rgba(255,255,255,.16); color: #fff; transform: scale(1.04); border-color: rgba(255,255,255,.25); }
.btn-pill:active { transform: scale(.95); }
.btn-pill.active { background: var(--ui-faint); color: var(--accent); border-color: rgba(255,255,255,.18); }

.btn-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ui-soft); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.65);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(12px);
  transition: background var(--t1), transform var(--t1) var(--spring), opacity var(--t2) var(--ease), filter var(--t2) var(--ease);
  will-change: transform;
}
.btn-icon:hover  { background: rgba(255,255,255,.18); transform: scale(1.08); }
.btn-icon:active { transform: scale(.95); }
.btn-icon svg    { width: 15px; height: 15px; fill: currentColor; }
.btn-icon.active { background: rgba(255,255,255,.9); color: #000; border-color: transparent; }

.btn-zen[aria-pressed="true"],
.btn-zen.active {
  background: rgba(224,36,94,.18);
  border-color: rgba(224,36,94,.4);
  color: var(--accent);
  box-shadow: 0 0 18px rgba(224,36,94,.25);
}
.btn-zen[aria-pressed="true"]:hover,
.btn-zen.active:hover { background: rgba(224,36,94,.28); }


/* ════════════════════════════════════════════════════════════════════════════
   AUTO-HIDE IDLE
════════════════════════════════════════════════════════════════════════════ */
#ui,
#status {
  transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1), filter .6s cubic-bezier(0.4, 0, 0.2, 1);
}
body.is-idle #ui {
  opacity: 0; pointer-events: none; filter: blur(3px);
}
body.is-idle #status {
  opacity: 0; filter: blur(2px);
}


/* ════════════════════════════════════════════════════════════════════════════
   MODE FOCUS ALBUM (ex "Zen Mode")
   [FIX] Suppression du !important sur #ui : le système is-idle reprend la main.
   Le bouton Focus Album masque tout → is-idle est forcé par le JS.
   Dès qu'on bouge la souris, le JS retire is-idle → l'UI réapparaît 2s.
════════════════════════════════════════════════════════════════════════════ */
/* Défaut zen : tout masqué */
body.zen-mode #ui {
  opacity: 0;
  pointer-events: none;
  filter: blur(3px);
  transition: opacity .5s var(--ease), filter .5s var(--ease);
}
body.zen-mode #status {
  opacity: 0;
  filter: blur(2px);
  transition: opacity .5s var(--ease), filter .5s var(--ease);
}

/* [NEW] Réapparition temporaire sur mouvement de souris (not idle) */
body.zen-mode:not(.is-idle) #ui {
  opacity: 1;
  pointer-events: all;
  filter: none;
}
body.zen-mode:not(.is-idle) #status {
  opacity: 1;
  filter: none;
}

/* Panneaux : toujours cachés en focus mode */
body.zen-mode #hist-panel,
body.zen-mode #settings-panel {
  opacity: 0 !important; pointer-events: none !important;
  transform: translateX(102%) !important;
}
body.zen-mode #hero { transform: none !important; }

/* Tout masqué sauf la pochette */
body.zen-mode #track-title,
body.zen-mode #artist-row,
body.zen-mode #progress-container,
body.zen-mode #eq-viz,
body.zen-mode #viz-canvas,
body.zen-mode #mq-wrap {
  opacity: 0; pointer-events: none;
  transition: opacity var(--t2) cubic-bezier(0.4, 0, 0.2, 1), filter var(--t2) cubic-bezier(0.4, 0, 0.2, 1);
  filter: blur(2px);
}

/* [UPDATED] Album art centré et agrandi en mode Focus */
body.zen-mode .album-wrapper {
  transform: scale(1.15);
  transition: transform var(--t3) var(--spring);
}


/* ── BOTTOM BAR / STATUS ─────────────────────────────────────────────────── */
.bottom-bar { position: absolute; bottom: 0; left: 0; right: 0; padding: 1.625rem 2rem; display: flex; align-items: flex-end; justify-content: flex-end; }

#status {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 100px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(12px); font-size: 0.625rem; color: var(--ui-dim);
  font-family: 'Instrument Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase;
}
#st-dot { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 6px #22c55e; transition: background .3s, box-shadow .3s; }
#st-dot.loading { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
#st-dot.error   { background: var(--accent); box-shadow: 0 0 6px var(--accent); }


/* ═══════════════════════════════════════════════════════════════════════════
   LOADING SCREEN (z 300)
═══════════════════════════════════════════════════════════════════════════ */
#loading {
  position: fixed; inset: 0; z-index: 300; background: #000;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1.125rem;
  transition: opacity .8s var(--ease);
}
.l-spinner {
  width: 36px; height: 36px;
  border: 2px solid var(--ui-faint); border-top-color: rgba(255,255,255,.6);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.l-loading-text { font-size: 0.625rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ui-dim); font-family: 'Instrument Sans', sans-serif; }


/* ═══════════════════════════════════════════════════════════════════════════
   TITLE COLOR BG — animated dominant-color orbs (z 2)
   Mode "Titre" : 4 orbs couleurs dominantes de la pochette qui bougent
═══════════════════════════════════════════════════════════════════════════ */

/* @property registrations — required for interpolating custom properties in @keyframes */
@property --tcbg-x0 { syntax: '<percentage>'; inherits: false; initial-value: 15%; }
@property --tcbg-y0 { syntax: '<percentage>'; inherits: false; initial-value: 25%; }
@property --tcbg-x1 { syntax: '<percentage>'; inherits: false; initial-value: 82%; }
@property --tcbg-y1 { syntax: '<percentage>'; inherits: false; initial-value: 72%; }
@property --tcbg-x2 { syntax: '<percentage>'; inherits: false; initial-value: 75%; }
@property --tcbg-y2 { syntax: '<percentage>'; inherits: false; initial-value: 18%; }
@property --tcbg-x3 { syntax: '<percentage>'; inherits: false; initial-value: 22%; }
@property --tcbg-y3 { syntax: '<percentage>'; inherits: false; initial-value: 80%; }

#title-color-bg {
  position: absolute; inset: -120px; z-index: 2;
  opacity: 0; pointer-events: none;
  filter: blur(90px) saturate(2.2) brightness(var(--tcbg-brightness,1)) contrast(var(--tcbg-contrast,1));
  transform: scale(1.18);
  transition: opacity 2.2s var(--ease), transform 2.4s var(--spring), filter 1s var(--ease);
  will-change: transform, opacity;
}
#title-color-bg.on { opacity: 0.82; transform: scale(1); }


/* ═══════════════════════════════════════════════════════════════════════════
   LYRICS APPLE MUSIC BG (z 5 — behind lyrics panel)
═══════════════════════════════════════════════════════════════════════════ */
#lyrics-am-bg {
  position: fixed; right: 0; top: 0; bottom: 0; width: 38%; z-index: 5;
  pointer-events: none; opacity: 0;
  filter: blur(60px) saturate(2.5);
  transition: opacity 1.5s var(--ease);
}
body.lyrics-apple-mode #lyrics-am-bg { opacity: 0.75; }


/* ═══════════════════════════════════════════════════════════════════════════
   FLUID GRADIENT BG (z 2)
═══════════════════════════════════════════════════════════════════════════ */
#fluid-gradient-bg {
  position: absolute; inset: -100px; z-index: 2;
  opacity: 0; pointer-events: none;
  filter: blur(80px) saturate(2.5) brightness(1.4);
  animation: fluidMove 14s ease-in-out infinite alternate;
  transition: opacity 2s var(--ease);
  will-change: transform, opacity;
}
#fluid-gradient-bg.on { opacity: 0.85; }

@keyframes fluidMove {
  0%   { transform: scale(1.0) translate(0%,   0%); }
  25%  { transform: scale(1.15) translate(6%,  -8%); }
  50%  { transform: scale(1.1) translate(-8%,   5%); }
  75%  { transform: scale(1.2) translate(4%,   9%); }
  100% { transform: scale(1.05) translate(-5%, -4%); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════════════════════ */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }


/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   TITLE ANIMATION STYLES (v8)
   Applied via body.title-anim-* class
═══════════════════════════════════════════════════════════════════════════ */

/* Default fade-up (existing .fade-up-text behaviour) */
body.title-anim-fade-up .title-entering {
  animation: titleAnimFadeUp 0.55s var(--spring) both;
}
@keyframes titleAnimFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* slide-left */
body.title-anim-slide-left .title-entering {
  animation: titleAnimSlideLeft 0.5s var(--snap) both;
}
@keyframes titleAnimSlideLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* scale-in */
body.title-anim-scale-in .title-entering {
  animation: titleAnimScaleIn 0.5s var(--spring) both;
}
@keyframes titleAnimScaleIn {
  from { opacity: 0; transform: scale(0.78); }
  to   { opacity: 1; transform: scale(1); }
}

/* blur-in */
body.title-anim-blur-in .title-entering {
  animation: titleAnimBlurIn 0.65s var(--ease) both;
}
@keyframes titleAnimBlurIn {
  from { opacity: 0; filter: blur(14px); }
  to   { opacity: 1; filter: blur(0); }
}

/* split — letters split from center */
body.title-anim-split .title-entering {
  animation: titleAnimSplit 0.6s var(--spring) both;
}
@keyframes titleAnimSplit {
  from { opacity: 0; letter-spacing: 0.35em; transform: scaleX(1.06); }
  to   { opacity: 1; letter-spacing: 0.03em; transform: scaleX(1); }
}

/* none */
body.title-anim-none .title-entering {
  animation: none !important;
}

/* ── NEW v11 TITLE ANIMATIONS ── */

/* fade-down — drops in from above */
body.title-anim-fade-down .title-entering {
  animation: titleAnimFadeDown 0.55s var(--spring) both;
}
@keyframes titleAnimFadeDown {
  from { opacity: 0; transform: translateY(-24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* slide-right — slides in from right */
body.title-anim-slide-right .title-entering {
  animation: titleAnimSlideRight 0.5s var(--snap) both;
}
@keyframes titleAnimSlideRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* scale-down — starts big, snaps to normal */
body.title-anim-scale-down .title-entering {
  animation: titleAnimScaleDown 0.5s var(--spring) both;
}
@keyframes titleAnimScaleDown {
  from { opacity: 0; transform: scale(1.22); }
  to   { opacity: 1; transform: scale(1); }
}

/* flip-x — 3D horizontal flip */
body.title-anim-flip-x .title-entering {
  animation: titleAnimFlipX 0.6s var(--snap) both;
  transform-style: preserve-3d;
}
@keyframes titleAnimFlipX {
  from { opacity: 0; transform: perspective(600px) rotateX(-70deg) translateY(-12px); }
  to   { opacity: 1; transform: perspective(600px) rotateX(0deg) translateY(0); }
}

/* swing — elastic pendulum */
body.title-anim-swing .title-entering {
  animation: titleAnimSwing 0.7s var(--spring) both;
  transform-origin: top center;
}
@keyframes titleAnimSwing {
  0%   { opacity: 0; transform: rotate(-8deg) translateY(-10px); }
  60%  { opacity: 1; transform: rotate(3deg) translateY(3px); }
  80%  { transform: rotate(-1.5deg) translateY(0); }
  100% { opacity: 1; transform: rotate(0deg) translateY(0); }
}

/* glitch — chromatic aberration flicker */
body.title-anim-glitch .title-entering {
  animation: titleAnimGlitch 0.55s steps(1) both;
}
@keyframes titleAnimGlitch {
  0%   { opacity: 0; clip-path: inset(0 0 100% 0); }
  10%  { opacity: 1; clip-path: inset(20% 0 40% 0); transform: translateX(-4px); filter: hue-rotate(90deg); }
  20%  { clip-path: inset(60% 0 10% 0); transform: translateX(4px); filter: hue-rotate(-90deg); }
  30%  { clip-path: inset(10% 0 70% 0); transform: translateX(-2px); filter: none; }
  40%  { clip-path: inset(80% 0 5% 0);  transform: translateX(2px); }
  55%  { clip-path: inset(0 0 0 0);     transform: translateX(0); filter: none; }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: none; filter: none; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   DECORATIVE DOTS — mode titlecolor (v8)
   Real fluid animations, no pop-in. Dots orbit/pulse/wave/sparkle around art.
═══════════════════════════════════════════════════════════════════════════ */

/* Dot container — injected by JS into .art-wrap */
.title-dots-container {
  position: absolute;
  inset: -48px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}
body.title-dots-on #s-player[class*="on"] .title-dots-container { opacity: 1; }

.title-dot {
  position: absolute;
  width: var(--dots-size);
  height: var(--dots-size);
  border-radius: 50%;
  background: var(--dots-color);
  filter: brightness(var(--dots-brightness)) blur(0.5px);
  box-shadow: 0 0 calc(var(--dots-size) * 1.5) var(--dots-color);
  top: 50%; left: 50%;
  transform-origin: 0 0;
}

/* ── ORBIT ── */
body.dots-orbit .title-dot:nth-child(1) { animation: dotOrbit1 var(--dots-duration) linear infinite; }
body.dots-orbit .title-dot:nth-child(2) { animation: dotOrbit2 var(--dots-duration) linear infinite; animation-delay: calc(var(--dots-duration) * -0.33); }
body.dots-orbit .title-dot:nth-child(3) { animation: dotOrbit3 var(--dots-duration) linear infinite; animation-delay: calc(var(--dots-duration) * -0.66); }
body.dots-orbit .title-dot:nth-child(4) { animation: dotOrbit4 calc(var(--dots-duration) * 1.4) linear infinite; animation-delay: calc(var(--dots-duration) * -0.2); }
body.dots-orbit .title-dot:nth-child(5) { animation: dotOrbit5 calc(var(--dots-duration) * 0.8) linear infinite; animation-delay: calc(var(--dots-duration) * -0.5); }

@keyframes dotOrbit1 {
  0%   { transform: translate(-50%,-50%) rotate(0deg)   translateX(52px) scale(1); opacity: 0.9; }
  50%  { transform: translate(-50%,-50%) rotate(180deg) translateX(52px) scale(0.7); opacity: 0.5; }
  100% { transform: translate(-50%,-50%) rotate(360deg) translateX(52px) scale(1); opacity: 0.9; }
}
@keyframes dotOrbit2 {
  0%   { transform: translate(-50%,-50%) rotate(0deg)   translateX(72px) scale(0.6); opacity: 0.4; }
  50%  { transform: translate(-50%,-50%) rotate(180deg) translateX(72px) scale(1);   opacity: 0.85; }
  100% { transform: translate(-50%,-50%) rotate(360deg) translateX(72px) scale(0.6); opacity: 0.4; }
}
@keyframes dotOrbit3 {
  0%   { transform: translate(-50%,-50%) rotate(120deg) translateX(58px) scale(0.8); opacity: 0.7; }
  100% { transform: translate(-50%,-50%) rotate(480deg) translateX(58px) scale(0.8); opacity: 0.7; }
}
@keyframes dotOrbit4 {
  0%   { transform: translate(-50%,-50%) rotate(240deg) translateX(42px) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%,-50%) rotate(600deg) translateX(42px) scale(1.1); opacity: 1; }
}
@keyframes dotOrbit5 {
  0%   { transform: translate(-50%,-50%) rotate(60deg)  translateX(85px) scale(0.5); opacity: 0.3; }
  100% { transform: translate(-50%,-50%) rotate(420deg) translateX(85px) scale(0.5); opacity: 0.3; }
}

/* ── PULSE ── */
body.dots-pulse .title-dot { animation: dotPulse var(--dots-duration) ease-in-out infinite; }
body.dots-pulse .title-dot:nth-child(1) { top: 20%; left: 50%; transform: translate(-50%,-50%); animation-delay: 0s; }
body.dots-pulse .title-dot:nth-child(2) { top: 50%; left: 18%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.2); }
body.dots-pulse .title-dot:nth-child(3) { top: 50%; left: 82%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.4); }
body.dots-pulse .title-dot:nth-child(4) { top: 78%; left: 35%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.6); }
body.dots-pulse .title-dot:nth-child(5) { top: 78%; left: 65%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.8); }
@keyframes dotPulse {
  0%, 100% { transform: translate(-50%,-50%) scale(0.6); opacity: 0.3; }
  50%       { transform: translate(-50%,-50%) scale(1.4); opacity: 1; }
}

/* ── WAVE ── */
body.dots-wave .title-dot {
  top: 50%; animation: dotWave var(--dots-duration) ease-in-out infinite;
}
body.dots-wave .title-dot:nth-child(1) { left: 10%; animation-delay: 0s; }
body.dots-wave .title-dot:nth-child(2) { left: 28%; animation-delay: calc(var(--dots-duration) * 0.15); }
body.dots-wave .title-dot:nth-child(3) { left: 46%; animation-delay: calc(var(--dots-duration) * 0.30); }
body.dots-wave .title-dot:nth-child(4) { left: 64%; animation-delay: calc(var(--dots-duration) * 0.45); }
body.dots-wave .title-dot:nth-child(5) { left: 82%; animation-delay: calc(var(--dots-duration) * 0.60); }
@keyframes dotWave {
  0%, 100% { transform: translate(-50%,-50%) translateY(0px) scale(0.7); opacity: 0.35; }
  50%       { transform: translate(-50%,-50%) translateY(-18px) scale(1.1); opacity: 1; }
}

/* ── SPARKLE ── */
body.dots-sparkle .title-dot { animation: dotSparkle var(--dots-duration) ease-in-out infinite; }
body.dots-sparkle .title-dot:nth-child(1) { top: 15%; left: 25%; transform: translate(-50%,-50%); animation-delay: 0s; }
body.dots-sparkle .title-dot:nth-child(2) { top: 15%; left: 75%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.25); }
body.dots-sparkle .title-dot:nth-child(3) { top: 50%; left: 10%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.5); }
body.dots-sparkle .title-dot:nth-child(4) { top: 50%; left: 90%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.1); }
body.dots-sparkle .title-dot:nth-child(5) { top: 85%; left: 50%; transform: translate(-50%,-50%); animation-delay: calc(var(--dots-duration) * 0.7); }
@keyframes dotSparkle {
  0%, 100% { transform: translate(-50%,-50%) scale(0) rotate(0deg);   opacity: 0; }
  10%       { transform: translate(-50%,-50%) scale(1.5) rotate(45deg);  opacity: 1; }
  40%       { transform: translate(-50%,-50%) scale(0.8) rotate(90deg);  opacity: 0.7; }
  60%       { transform: translate(-50%,-50%) scale(1.2) rotate(135deg); opacity: 0.9; }
  80%       { transform: translate(-50%,-50%) scale(0.4) rotate(180deg); opacity: 0.3; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV — barre de navigation fixe en bas (masquée sur desktop)
═══════════════════════════════════════════════════════════════════════════ */
#mobile-nav {
  display: none; /* caché sur desktop */
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE (≤ 768px)
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── UI desktop: masqué sur mobile ─────────────────────────────── */
  #ui { display: none !important; }

  /* ── Barre de navigation mobile ────────────────────────────────── */
  #mobile-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: rgba(8,8,10,0.88);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0;
  }
  body.is-idle #mobile-nav,
  body.zen-mode #mobile-nav { opacity: 0; pointer-events: none; transition: opacity .5s; }
  body.zen-mode:not(.is-idle) #mobile-nav,
  body:not(.zen-mode) #mobile-nav { opacity: 1; pointer-events: all; }

  .mnav-btn {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    min-height: 52px; padding: 6px 4px;
    background: transparent; border: none; color: var(--ui-dim);
    font-family: 'Instrument Sans', sans-serif;
    font-size: 0.5625rem; font-weight: 500; letter-spacing: .05em;
    text-transform: uppercase; cursor: pointer;
    transition: color var(--t1) var(--ease), transform .15s var(--spring);
    -webkit-tap-highlight-color: transparent;
  }
  .mnav-btn svg { width: 22px; height: 22px; }
  .mnav-btn:active { transform: scale(.88); }
  .mnav-btn.active { color: var(--accent); }
  .mnav-btn-zen.active { color: var(--accent); }

  /* ── Panels: slide from bottom, full screen ─────────────────────── */
  #lyrics-panel, #hist-panel {
    right: 0; left: 0; bottom: 0; top: auto;
    width: 100%;
    height: 82vh;
    padding: 1.5rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    transform: translateY(105%) !important;
    opacity: 0;
    z-index: 30;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(8,8,10,0.92) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
  }
  #lyrics-panel.on, #hist-panel.on {
    transform: translateY(0) !important;
    opacity: 1;
  }
  /* No backdrop-filter override on mobile: we handle it above */
  #lyrics-panel.lyrics-blur-standard,
  #lyrics-panel.lyrics-blur-apple { background: transparent !important; }

  #settings-panel {
    right: 0; left: 0; bottom: 0; top: auto;
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    transform: translateY(105%);
    opacity: 0;
    z-index: 40;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #settings-panel.on {
    transform: translateY(0);
    opacity: 1;
  }

  /* ── Hero: no sideways shift on mobile ──────────────────────────── */
  #hero.shifted { transform: translateX(0) !important; }

  /* ── Lyrics position modes: all become bottom-up on mobile ─────── */
  body.lyrics-pos-center #lyrics-panel,
  body.lyrics-pos-bottom #lyrics-panel {
    right: 0; left: 0; bottom: 0; top: auto;
    width: 100%; height: 82vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(105%) !important;
  }
  body.lyrics-pos-center #lyrics-panel.on,
  body.lyrics-pos-bottom #lyrics-panel.on {
    transform: translateY(0) !important;
  }
  body.lyrics-pos-center #hero.shifted,
  body.lyrics-pos-bottom #hero.shifted { transform: none !important; }

  /* ── Album art ──────────────────────────────────────────────────── */
  .art-wrap { width: clamp(180px, 60vw, 280px) !important; height: clamp(180px, 60vw, 280px) !important; }
  .art-img   { width: 100% !important; height: 100% !important; }
  .fallback-art { width: 100% !important; height: 100% !important; }
  .art-glow  { width: 100% !important; height: 100% !important; }

  /* ── Track text ─────────────────────────────────────────────────── */
  #track-title { font-size: clamp(2rem, 8vw, 3.5rem) !important; }
  #track-artist { font-size: clamp(1rem, 3.5vw, 1.4rem) !important; }
  .track-title-wrap { max-width: 88vw; }

  /* ── Hero bottom padding to clear nav bar ───────────────────────── */
  #hero { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

  /* ── Settings panel header & tabs ──────────────────────────────── */
  .sp-header { padding: 1.25rem 1.25rem 0; }
  .sp-title  { font-size: 1.375rem; margin-bottom: 0.875rem; }
  .sp-tab    { font-size: 0.5rem; padding: 8px 4px; }
  .sp-tab-pane { padding: 1.25rem 1.25rem calc(5rem + env(safe-area-inset-bottom, 0px)); }

  /* ── Settings: hide keyboard shortcuts ─────────────────────────── */
  .sp-shortcuts-section { display: none; }

  /* ── All touch targets: minimum 44px ───────────────────────────── */
  .sp-option  { min-height: 44px; padding: 10px 16px; font-size: 0.8125rem; }
  .toggle     { width: 44px; height: 24px; }
  .toggle-track { border-radius: 12px; }
  .toggle-thumb { top: 3px; left: 3px; width: 16px; height: 16px; }
  .toggle input:checked ~ .toggle-thumb { transform: translateX(20px); }
  .l-btn      { padding: 1.0625rem; min-height: 52px; }
  .sp-logout  { min-height: 52px; }
  .lanyard-connect-btn { min-height: 52px; padding: 0 1.25rem; font-size: 0.875rem; }

  /* ── Album ctx menu: always visible on mobile ───────────────────── */
  .album-ctx-menu {
    opacity: 1; pointer-events: all;
    transform: translateX(-50%) translateY(0);
  }
  body.is-idle .album-ctx-menu,
  body.zen-mode .album-ctx-menu { opacity: 0 !important; pointer-events: none !important; }

  /* ── LP body: more height ────────────────────────────────────────── */
  .lp-body { max-height: 65vh; }
  #lrc-container { padding: 22vh 0.75rem 28vh; }

  /* ── History panel ──────────────────────────────────────────────── */
  .hp-list { max-height: 62vh; }

  /* ── No text marquee on mobile (perf) ──────────────────────────── */
  #mq-wrap { display: none; }

  /* ── Sliders: bigger thumb for touch ───────────────────────────── */
  .sp-slider::-webkit-slider-thumb { width: 20px; height: 20px; }

  /* ── Login card ─────────────────────────────────────────────────── */
  .l-card { padding: 2.5rem 1.75rem; }

  /* ── Focus mode: smaller album scale ───────────────────────────── */
  body.zen-mode .album-wrapper { transform: scale(1.05); }

  /* ── Progress bar: show by default on mobile ────────────────────── */
  #progress-container { display: block; width: clamp(200px, 72vw, 360px); }
}

/* ── very small screens ──────────────────────────────────────────────────── */
@media (max-width: 380px) {
  .art-wrap { width: 54vw !important; height: 54vw !important; }
  #track-title { font-size: 7.5vw !important; }
  .mnav-btn span { display: none; }
  .mnav-btn { min-height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-layer { animation: none; }
  #mq { animation: none; }
  #track-title.scrolling { animation: none; }
  .art-wrap { animation: none !important; }
  body.art-glow-pulse .art-glow { animation: none !important; }
  #lyrics-panel.lyrics-blur-apple::before { animation: none; }
  .title-dot { animation: none !important; }
  .title-entering { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SYNC TAB — Restructured layout (v9)
   Sections claires, cartes, sélecteur de priorité.
═══════════════════════════════════════════════════════════════════════════ */

/* ── Section headers ───────────────────────────────────────────────────── */
.sync-section-header {
  font-size: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.22);
  padding-bottom: 0.375rem;
  margin: 1.375rem 0 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
#tab-sync .sync-section-header:first-child { margin-top: 0.25rem; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.sync-card {
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  margin-bottom: 0.5rem;
  transition: border-color .3s var(--ease);
}
.sync-card:last-of-type { margin-bottom: 0; }

.sync-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.75rem;
}

.sync-card-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sync-card-icon.lastfm  { background: rgba(224,36,94,.18); }
.sync-card-icon.discord { background: rgba(88,101,242,.18); }

.sync-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  letter-spacing: .01em;
  flex: 1;
}

.sync-card-username {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.625rem;
  color: rgba(255,255,255,.4);
}

.sync-card-label {
  font-size: 0.625rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  margin-bottom: 0.625rem;
}

.sync-hint {
  font-size: 0.625rem;
  color: rgba(255,255,255,.2);
  margin-top: 0.375rem;
  line-height: 1.5;
}

/* ── Priority selector ──────────────────────────────────────────────────── */
.sync-priority-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 0.75rem;
}

.sync-priority-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 0.875rem 0.875rem 0.875rem;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  text-align: left;
  cursor: pointer;
  transition:
    background .2s var(--ease),
    border-color .2s var(--ease),
    transform .15s var(--spring),
    box-shadow .2s var(--ease);
  will-change: transform;
}
.sync-priority-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  transform: translateY(-1px);
}
.sync-priority-btn:active { transform: scale(.97); }
.sync-priority-btn.active {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 3px 14px rgba(0,0,0,.25);
}

.sync-priority-badge {
  font-size: 1.1rem;
  line-height: 1;
  display: block;
}

.sync-priority-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  font-family: 'Instrument Sans', sans-serif;
  line-height: 1;
  display: block;
}
.sync-priority-btn.active .sync-priority-label { color: rgba(255,255,255,.95); }

.sync-priority-desc {
  font-size: 0.5625rem;
  color: rgba(255,255,255,.25);
  line-height: 1.55;
  font-family: 'Instrument Sans', sans-serif;
  display: block;
}
.sync-priority-btn.active .sync-priority-desc { color: rgba(255,255,255,.42); }

/* active state accent ring depending on priority */
.sync-priority-btn[data-priority="lanyard"].active {
  border-color: rgba(29,185,84,.35);
  background: rgba(29,185,84,.07);
  box-shadow: 0 3px 14px rgba(29,185,84,.1);
}
.sync-priority-btn[data-priority="lastfm"].active {
  border-color: rgba(224,36,94,.35);
  background: rgba(224,36,94,.07);
  box-shadow: 0 3px 14px rgba(224,36,94,.1);
}

.sync-priority-status {
  font-size: 0.625rem;
  color: rgba(255,255,255,.25);
  line-height: 1.6;
  padding: 0.375rem 0 0;
  border-top: 1px solid rgba(255,255,255,.05);
}

/* ── Extended stats — display under artist row ─────────────────────────── */
#extended-stats {
  font-size: 0.625rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  color: rgba(255,255,255,.28);
  margin-top: 0.25rem;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s var(--ease), opacity .4s var(--ease), margin-top .4s var(--ease);
  text-shadow: var(--text-shadow-legible);
}
#extended-stats.on:not(:empty) {
  max-height: 24px;
  opacity: 1;
  margin-top: 0.375rem;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE TOGGLE BUTTON — login card bottom
═══════════════════════════════════════════════════════════════════════════ */
.l-lang-toggle {
  position: absolute;
  top: 1.125rem; right: 1.25rem;
  background: var(--ui-soft);
  border: 1px solid var(--ui-ghost);
  border-radius: 6px;
  color: var(--ui-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.5625rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 8px;
  cursor: pointer;
  transition: background var(--t1), color var(--t1), border-color var(--t1);
}
.l-lang-toggle:hover {
  background: var(--ui-soft);
  border-color: rgba(255,255,255,.18);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATUS DOT — green "ok" state (was missing)
═══════════════════════════════════════════════════════════════════════════ */
#st-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34,197,94,.6);
  animation: none;
}
#st-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239,68,68,.5);
  animation: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUB-STATS v11 — card-based modern design
═══════════════════════════════════════════════════════════════════════════ */
#sub-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--spring);
  pointer-events: none;
}
#sub-stats.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Cards row */
.ss-cards {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(88vw, 520px);
}

/* Individual stat card */
.ss-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.875rem 0.45rem 0.6rem;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s var(--ease), border-color .2s var(--ease);
  min-width: 0;
}
.ss-card:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.16);
}

/* Card icon */
.ss-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.ss-card-icon svg { width: 12px; height: 12px; color: var(--ui-mid); }

.ss-card-personal .ss-card-icon {
  background: rgba(var(--accent-rgb, 224,36,94), 0.18);
}
.ss-card-personal .ss-card-icon svg { color: var(--accent); }

/* Card text */
.ss-card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.ss-val {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(0.8125rem, 1.5vw, 0.9375rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -.01em;
}
.ss-val-accent { color: var(--accent); }
.ss-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(0.5rem, 0.9vw, 0.5625rem);
  font-weight: 500;
  color: var(--ui-dim);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

/* Switch button */
.ss-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.45rem 0.75rem 0.45rem 0.6rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: var(--ui-soft);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .15s var(--spring);
  white-space: nowrap;
  align-self: center;
}
.ss-switch svg {
  width: 11px; height: 11px;
  flex-shrink: 0;
  opacity: 0.6;
}
.ss-switch:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
  transform: scale(1.04);
}
.ss-switch:active { transform: scale(.94); }

/* Mobile */
@media (max-width: 768px) {
  .ss-cards { gap: 0.375rem; }
  .ss-card { padding: 0.375rem 0.625rem 0.375rem 0.5rem; border-radius: 12px; }
  .ss-val { font-size: 0.8125rem; }
  .ss-label { font-size: 0.4375rem; max-width: 90px; }
  .ss-switch { font-size: 0.5rem; padding: 0.375rem 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SELECTOR — settings panel
═══════════════════════════════════════════════════════════════════════════ */
.sync-card-lang { padding: 0.75rem !important; }

.lang-selector {
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--ui-faint);
  border: 1.5px solid var(--ui-ghost);
  border-radius: 0.75rem;
  color: var(--ui-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s, color .18s, transform .15s var(--spring);
}
.lang-btn:hover {
  background: var(--ui-soft);
  color: var(--ui-bright);
  border-color: rgba(255,255,255,.16);
}
.lang-btn:active { transform: scale(.96); }
.lang-btn.active {
  background: rgba(var(--accent-rgb, 224,36,94), 0.15);
  border-color: var(--accent);
  color: #fff;
}
.lang-flag { font-size: 1.125rem; line-height: 1; }
.lang-name { font-size: 0.8125rem; font-weight: 600; }

/* ─── accent-rgb helper (derive from --accent for rgba usage) ─── */
:root { --accent-rgb: 224,36,94; }


/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE IMPROVEMENTS v10
═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Hero: better vertical distribution ── */
  #track-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  /* ── Artist row: compact on mobile ── */
  #artist-row {
    margin-top: 0.75rem;
    gap: 0.5rem;
  }

  /* ── Panels: add scroll momentum for iOS ── */
  #lyrics-panel .lp-body,
  #hist-panel .hp-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* ── Settings panel: better scroll feel ── */
  #settings-panel .sp-tab-pane {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  /* ── Sync cards: slightly tighter on mobile ── */
  .sync-card { padding: 1rem; }

  /* ── Lanyard wrap: stack on very small ── */
  .lanyard-connect-wrap {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .lanyard-connect-wrap .user-search-input { flex: 1 1 180px; }

  /* ── Lyrics panel: full screen overlay style ── */
  #lyrics-panel {
    transition: transform .42s var(--snap), opacity .35s var(--ease) !important;
  }

  /* ── History items: slightly larger tap targets ── */
  .hp-item { min-height: 52px; padding: 0.75rem 0.875rem; }

  /* ── eq-viz: hidden on mobile by default ── */
  #eq-viz { display: none !important; }

  /* ── Progress container: full width on mobile ── */
  #progress-container { width: min(82vw, 340px) !important; }
}

/* ── Landscape phone: compact layout ── */
@media (max-width: 812px) and (orientation: landscape) {
  #hero { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .art-wrap { width: 38vw !important; height: 38vw !important; max-width: 200px !important; max-height: 200px !important; }
  #track-title { font-size: clamp(1.4rem, 5vw, 2.5rem) !important; }
  #mobile-nav { padding-top: 0.25rem; padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px)); }
  .mnav-btn { min-height: 44px; }
  #lyrics-panel, #hist-panel { height: 88vh; }
  .lp-body { max-height: 75vh; }
}


/* ════════════════════════════════════════════════════════════════════════════
   TÉLÉCOMMANDE — code affiché dans le settings panel (display device)
════════════════════════════════════════════════════════════════════════════ */
.rc-config-note {
  font-size: .75rem; color: var(--ui-dim); line-height: 1.5;
}
.rc-config-note code { font-family: 'JetBrains Mono', monospace; color: var(--accent); }

.rc-code-block { display: flex; flex-direction: column; gap: .5rem; }
.rc-code-label { font-size: .625rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ui-dim); font-weight: 500; }
.rc-code-value {
  font-family: 'JetBrains Mono', monospace; font-size: 1.75rem;
  letter-spacing: .3em; color: #fff; font-weight: 700;
  padding: .625rem 1rem; background: var(--ui-soft);
  border: 1px solid var(--ui-ghost); border-radius: .5rem;
  text-align: center;
}
.rc-copy-btn {
  padding: .5rem .875rem; font-size: .6875rem; font-weight: 600;
  background: var(--ui-soft); border: 1px solid var(--ui-ghost); border-radius: .375rem;
  color: var(--ui-mid); cursor: pointer; align-self: flex-start;
  transition: background var(--t1), color var(--t1);
  font-family: 'Instrument Sans', sans-serif;
}
.rc-copy-btn:hover { background: var(--ui-ghost); color: #fff; }
.rc-code-hint { font-size: .7rem; color: var(--ui-dim); line-height: 1.5; }


/* ════════════════════════════════════════════════════════════════════════════
   TÉLÉCOMMANDE — panel plein écran (remote device)
════════════════════════════════════════════════════════════════════════════ */
#rc-panel {
  position: fixed; inset: 0; z-index: 300;
  background: #06060a;
  display: none; flex-direction: column;
  font-family: 'Instrument Sans', sans-serif;
  overflow: hidden;
}
#rc-panel.on { display: flex; }

/* Wrapper interne */
.rc-wrap {
  display: flex; flex-direction: column;
  height: 100%; width: 100%; max-width: 520px; margin: 0 auto;
}

/* Header */
.rc-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.125rem 1.25rem 1rem;
  background: rgba(8,8,14,.97);
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.rc-hdr-left { display: flex; align-items: center; gap: .625rem; }
.rc-wordmark {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem;
  letter-spacing: .06em; color: #fff; line-height: 1;
}
.rc-badge {
  font-size: .5625rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ui-dim); font-weight: 500; padding: .25rem .5rem;
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: .25rem;
}
.rc-hdr-right { display: flex; align-items: center; gap: .75rem; }

/* Dot de connexion */
.rc-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  transition: background .4s;
}
.rc-dot.on {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.2);
  animation: rcDotPulse 2.5s ease-in-out infinite;
}
@keyframes rcDotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
  50%       { box-shadow: 0 0 0 6px rgba(34,197,94,.05); }
}

.rc-code-tag {
  font-family: 'JetBrains Mono', monospace; font-size: .8125rem;
  letter-spacing: .2em; color: var(--ui-mid);
}
.rc-disc {
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: .375rem;
  color: var(--ui-dim); font-size: .875rem; padding: .3rem .55rem;
  cursor: pointer; line-height: 1;
  transition: background var(--t1), color var(--t1);
}
.rc-disc:hover { background: rgba(255,60,60,.12); color: #ff6060; border-color: rgba(255,60,60,.25); }

/* Body scrollable */
.rc-body {
  flex: 1; overflow-y: auto;
  padding: .75rem 1.25rem 2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.07) transparent;
  -webkit-overflow-scrolling: touch;
}
.rc-body::-webkit-scrollbar       { width: 3px; }
.rc-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.09); border-radius: 2px; }
.rc-body::-webkit-scrollbar-track { background: transparent; }

/* Sections */
.rc-section {
  margin-bottom: .5rem; padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.rc-section:last-child { border-bottom: none; }
.rc-sh {
  font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: .875rem;
}
.rc-sub-sh {
  font-size: .5875rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ui-dim); font-weight: 500; margin-bottom: .5rem;
}

/* Label */
.rc-lbl {
  font-size: .6875rem; color: var(--ui-dim); font-weight: 500;
  margin-bottom: .4rem; display: block;
}

/* Row: label + toggle side by side */
.rc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .4375rem 0; border-bottom: 1px solid rgba(255,255,255,.03);
}
.rc-row:last-of-type { border-bottom: none; }
.rc-row .rc-lbl { margin: 0; color: var(--ui-mid); font-size: .75rem; }

/* Toggle (réutilise la logique du settings panel) */
.rc-toggle {
  position: relative; display: inline-flex;
  width: 38px; height: 22px; cursor: pointer; flex-shrink: 0;
}
.rc-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.rc-tt {
  position: absolute; inset: 0; border-radius: 99px;
  background: rgba(255,255,255,.12);
  transition: background .25s var(--ease);
}
.rc-th {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .22s var(--spring), box-shadow .22s;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.rc-toggle input:checked ~ .rc-tt { background: var(--accent); }
.rc-toggle input:checked ~ .rc-th { transform: translateX(16px); box-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* Option group */
.rc-opt-grp {
  display: flex; gap: 4px; flex-wrap: nowrap;
  margin-bottom: .25rem;
}
.rc-opt-grp-wrap { flex-wrap: wrap; }
.rc-opt {
  flex: 1; min-width: 0;
  padding: .4375rem .375rem; font-size: .6375rem; font-weight: 500; letter-spacing: .04em;
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: .375rem;
  color: var(--ui-dim); cursor: pointer; white-space: nowrap;
  transition: background var(--t1), color var(--t1), border-color var(--t1);
  font-family: 'Instrument Sans', sans-serif;
}
.rc-opt:hover  { background: var(--ui-soft); color: var(--ui-mid); }
.rc-opt.active { background: var(--accent); color: #fff; border-color: transparent; }

/* Sliders */
.rc-slider-row { margin-bottom: .625rem; }
.rc-slider-row .rc-lbl { margin-bottom: .3rem; }
.rc-val { color: var(--ui-mid); font-weight: 400; }
.rc-slider {
  width: 100%; height: 3px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--pct,50%), rgba(255,255,255,.12) var(--pct,50%));
  border-radius: 99px; outline: none; cursor: pointer;
}
.rc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.4);
  cursor: pointer; transition: transform .15s var(--spring);
}
.rc-slider::-webkit-slider-thumb:hover  { transform: scale(1.15); }
.rc-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: none; box-shadow: 0 1px 6px rgba(0,0,0,.4);
  cursor: pointer;
}

/* Swatches accent */
.rc-swatches { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: .75rem; }
.rc-swatch {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s var(--spring), border-color .15s;
  flex-shrink: 0;
}
.rc-swatch:hover  { transform: scale(1.18); }
.rc-swatch.active { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 3px rgba(255,255,255,.18); }


/* ════════════════════════════════════════════════════════════════════════════
   v10 — LYRICS RENDER MODES
════════════════════════════════════════════════════════════════════════════ */

/* ── MODE BASIC : texte statique, pas d'animations ───────────────────────── */
body.lrc-render-basic #lrc-container {
  transition: none;
}
body.lrc-render-basic .lrc-line {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  color: var(--lyrics-inactive-color);
  transition: color .3s var(--ease);
  cursor: default;
  pointer-events: none;
}
body.lrc-render-basic .lrc-line.active {
  color: var(--lyrics-active-color);
}

/* ── MODE SCROLL : défilement sans animation de ligne ────────────────────── */
body.lrc-render-scroll .lrc-line {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  color: var(--lyrics-inactive-color);
  transition: color .3s var(--ease);
  font-size: calc(clamp(0.9rem, 1.25vw, 1.1rem) * var(--lyrics-size));
  padding: .35rem 0;
}
body.lrc-render-scroll .lrc-line.active {
  color: var(--lyrics-active-color);
  font-weight: 600;
}
body.lrc-render-scroll #lrc-container {
  transition: transform 0.4s var(--ease);
}

/* ── MODE PHRASE : comportement d'origine (déjà géré par .lrc-anim-*) ────── */
/* nothing to override — uses existing .lrc-line + .lrc-anim-* rules */

/* ── MODE KARAOKE ─────────────────────────────────────────────────────────── */
body.lrc-render-karaoke .lrc-line {
  filter: blur(0.8px);
  opacity: .25;
  transform: scale(.94);
  transition: opacity .4s var(--ease), filter .4s var(--ease), transform .35s var(--spring);
  line-height: 2.1;
}
body.lrc-render-karaoke .lrc-line.active {
  opacity: 1;
  filter: none;
  transform: scale(1.06);
}
body.lrc-render-karaoke .lrc-line.near {
  opacity: .45;
  filter: blur(0.4px);
  transform: scale(.97);
}

/* Karaoke word spans — grey base ALWAYS visible */
.kw {
  display: inline-block;
  position: relative;
  color: var(--lyrics-inactive-color);
  transition: color .3s var(--ease);
  white-space: pre;
}

/* Active line words: base stays grey, ::after overlay slides from left */
body.karaoke-fill .lrc-line.active .kw {
  color: color-mix(in srgb, var(--lyrics-inactive-color) 60%, transparent);
}
body.karaoke-fill .lrc-line.active .kw::after {
  content: attr(data-word);
  position: absolute;
  left: 0; top: 0;
  color: var(--lyrics-active-color);
  white-space: pre;
  /* Clip reveals left→right based on --kw-fill */
  clip-path: inset(0 calc(100% - var(--kw-fill, 0%)) 0 0);
  transition: clip-path 0.06s linear;
  pointer-events: none;
  font: inherit;
  letter-spacing: inherit;
}
/* Glow on fully filled words */
body.karaoke-fill .lrc-line.active .kw[style*="100%"]::after {
  text-shadow: 0 0 18px color-mix(in srgb, var(--lyrics-active-color) 70%, transparent);
}

/* When karaoke fill is OFF: tint active words */
body:not(.karaoke-fill) .lrc-line.active .kw {
  color: var(--lyrics-active-color);
  text-shadow: 0 0 18px color-mix(in srgb, var(--lyrics-active-color) 45%, transparent);
  transition: color .2s var(--ease), text-shadow .2s var(--ease);
}


/* ════════════════════════════════════════════════════════════════════════════
   v10 — APPLE MUSIC ENHANCED LYRICS MODE
   body.lyrics-apple-mode — large typography, motion blur, vibrant gradients
════════════════════════════════════════════════════════════════════════════ */
body.lyrics-apple-mode .lrc-line {
  font-family: 'Outfit', 'SF Pro Display', system-ui, sans-serif !important;
  font-weight: 800;
  font-style: normal;
  font-size: calc(clamp(1.25rem, 2.2vw, 1.875rem) * var(--lyrics-size));
  line-height: 1.55;
  letter-spacing: -0.02em;
  opacity: .18;
  filter: blur(4px);
  transform: scale(.9) translateY(6px);
  transition:
    opacity   .55s cubic-bezier(0.22, 1, 0.36, 1),
    filter    .55s cubic-bezier(0.22, 1, 0.36, 1),
    transform .6s  cubic-bezier(0.34, 1.56, 0.64, 1),
    color     .4s  var(--ease);
}
body.lyrics-apple-mode .lrc-line.active {
  opacity: 1;
  filter: none;
  transform: scale(1.03) translateY(0);
  color: var(--lyrics-active-color);
  text-shadow:
    0 0 40px color-mix(in srgb, var(--lyrics-active-color) 55%, transparent),
    0 2px 12px rgba(0,0,0,.4);
}
body.lyrics-apple-mode .lrc-line.near {
  opacity: .42;
  filter: blur(1.5px);
  transform: scale(.95) translateY(3px);
}

/* Apple Music lyrics — enhanced background panel */
body.lyrics-apple-mode #lyrics-panel {
  border-left: none !important;
  background: transparent !important;
}
body.lyrics-apple-mode #lyrics-am-bg {
  opacity: .88 !important;
  filter: blur(50px) saturate(3.5) !important;
  transition: opacity 1.2s var(--ease), filter 1.2s var(--ease) !important;
}
body.lyrics-apple-mode #lrc-container {
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Subtle vibrancy tint behind active region */
body.lyrics-apple-mode .lrc-line.active::before {
  content: '';
  position: absolute;
  inset: -8px -12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--lyrics-active-color) 10%, transparent);
  filter: blur(12px);
  z-index: -1;
  pointer-events: none;
  transition: background .5s var(--ease);
}
body.lyrics-apple-mode .lrc-line { position: relative; }

/* rc-apply-all button */
.rc-apply-all-btn {
  width: 100%;
  margin-bottom: .875rem;
  padding: .625rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: .5rem;
  color: var(--accent);
  font-family: 'Instrument Sans', sans-serif;
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  cursor: pointer;
  transition: background var(--t1), opacity var(--t1);
}
.rc-apply-all-btn:hover  { background: color-mix(in srgb, var(--accent) 28%, transparent); }
.rc-apply-all-btn:active { opacity: .75; }


/* ════════════════════════════════════════════════════════════════════════════
   v10c — SHOW/HIDE API KEY
════════════════════════════════════════════════════════════════════════════ */
.field-wrap {
  position: relative; display: flex; align-items: center;
}
.field-wrap input {
  flex: 1; padding-right: 2.5rem !important;
}
.field-eye {
  position: absolute; right: 0.75rem;
  background: transparent; border: none; cursor: pointer;
  color: var(--ui-dim); padding: 0; line-height: 1;
  transition: color var(--t1);
  display: flex; align-items: center;
}
.field-eye:hover { color: var(--ui-mid); }
.field-eye svg { display: block; }


/* ════════════════════════════════════════════════════════════════════════════
   v10c — PRESETS
════════════════════════════════════════════════════════════════════════════ */
.sp-preset-grid {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: .5rem;
}
.sp-preset-btn {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-rows: auto auto;
  gap: 0 .625rem;
  padding: .875rem 1rem;
  background: var(--ui-faint); border: 1px solid var(--ui-ghost); border-radius: 10px;
  text-align: left; cursor: pointer;
  transition: background var(--t1), border-color var(--t1), transform .15s var(--spring);
  font-family: 'Instrument Sans', sans-serif;
}
.sp-preset-btn:hover { background: var(--ui-soft); border-color: rgba(255,255,255,.18); }
.sp-preset-btn:active { transform: scale(.97); }
.sp-preset-btn.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.sp-preset-icon {
  grid-row: 1 / 3;
  font-size: 1.5rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  align-self: center;
}
.sp-preset-name {
  font-size: .8125rem; font-weight: 600; color: var(--ui-bright);
  line-height: 1.3;
}
.sp-preset-desc {
  font-size: .625rem; color: var(--ui-dim); line-height: 1.4;
  letter-spacing: .02em;
}
