@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Roboto:wght@400;500;700;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
/* Instant tap response (no double-tap zoom wait on controls) */
button, .btn, .tab-btn, .search-result, .host-result, .vote-card, .queue-item.track-card, .btn-vote, .btn-react, .np-ctrl-btn, .np-btn-cta {
  touch-action: manipulation;
}

:root {
  /* ── ZPEED / Spotify premium base ── */
  --page-bg:      #0B0B0B;
  --spotify:      #1DB954;
  --spotify-hover: #1ed760;
  --spotify-press: #159642;
  --on-spotify:   #0b0b0b;

  /* ── BACKGROUNDS ── */
  --bg:           #0B0B0B;
  --bg2:          #121214;
  --bg3:          #18181c;
  --bg4:          #1e1e24;

  /* ── BRAND ACCENT (Spotify + legacy teal alias) ── */
  --purple:       #1DB954;
  --purple-light: #1ed760;
  --purple-dim:   rgba(29,185,84,0.14);

  /* ── STATUS COLORS ── */
  --teal:         #10B981;
  --green:        #34D399;
  --green-dim:    rgba(52,211,153,0.12);
  --red:          #EF4444;
  --blue:         #3B82F6;
  --orange:       #F97316;
  --pink:         #EC4899;

  /* ── TEXT ── */
  --text:         #ffffff;
  --text2:        rgba(255,255,255,0.50);
  --text3:        rgba(255,255,255,0.28);

  /* ── GLASS SURFACES ── */
  --glass:        rgba(255,255,255,0.05);
  --glass-hover:  rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.07);

  /* ── BORDERS ── */
  --border:       rgba(255,255,255,0.06);
  --border2:      rgba(255,255,255,0.10);

  /* ── RADIUS / LAYOUT (party, one-hand) ── */
  --max-app:      680px;
  --space-y-sm:   8px;
  --space-y:      12px;
  --space-y-lg:   16px;
  --track-min-h:  72px;
  --ui-tap:       48px;
  --ui-tap-ideal: 56px;
  --radius-card:  20px;
  --radius:       16px;
  --radius-sm:    10px;
  --font-ui:      1rem;       /* 16px min */
  --font-title:   clamp(1rem, 2.8vw, 1.125rem);
  --font-sec:     0.875rem;  /* 14px secondary */

  /* ── LEGACY ALIASES ── */
  --accent:       #1DB954;
  --accent-dim:   rgba(29,185,84,0.12);
  --accent-text:  #1ed760;

  /* iOS-like motion (≤300ms, GPU-friendly) */
  --motion-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --motion-press: 0.1s;
  --motion-surface: 0.15s;
  --motion-appear: 0.2s;
  --mini-player-height: 96px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
}
html, body {
  min-height: 100%;
  min-height: -webkit-fill-available;
  font-family: 'Roboto', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: var(--font-ui);
  -webkit-overflow-scrolling: touch;
}
body {
  overscroll-behavior-y: contain;
}

/* ── CONTAINER: max 680px, 16px padding mobile / 32px desktop ── */
.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-app);
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left)) calc(48px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right));
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  gap: var(--space-y-sm);
}
@media (min-width: 769px) {
  .container {
    padding-left: max(32px, env(safe-area-inset-left));
    padding-right: max(32px, env(safe-area-inset-right));
  }
}
.container--onboard {
  max-width: var(--max-app);
}

/* ── HEADER ── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding-top respecte la Dynamic Island / encoche */
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 10px;
}

/* ══════════════════════════════════════════
   LOGO — Image flottante (PNG transparent)
   ══════════════════════════════════════════ */

/* Header logo (petit, haut-gauche) */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.logo-img {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.15));
}

/* Fallback texte si logo.png absent */
.logo-z {
  font-family: 'Bangers', cursive;
  font-size: 1.65rem; letter-spacing: 2px;
  color: #fff; line-height: 1;
}
.logo-m {
  font-family: 'Roboto', sans-serif;
  font-size: 0.46rem; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 1px;
}

/* ══════════════════════════════════════════
   LOGO HERO (index.html) — version grande
   ══════════════════════════════════════════ */
/* ── HERO LOGO (image flottante, pas de cadre) ── */
.logo-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
}
.logo-hero-img {
  width: clamp(180px, 55vw, 280px);
  height: auto;
  display: block;
  /* drop-shadow pour faire ressortir le blanc sur le fond */
  filter: drop-shadow(0 0 24px rgba(255,255,255,0.18)) drop-shadow(0 0 8px rgba(255,255,255,0.10));
}

/* ── CARD BASE — dark glass (flat, no heavy drop shadow) ── */
.glass, .card {
  background: #141416;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 20px;
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: none;
  max-width: 100%;
}

/* Gradient variants — from reference */
.glass-purple {
  background: linear-gradient(140deg, rgba(42,16,130,0.70), rgba(100,56,180,0.55));
  border-color: rgba(255,255,255,0.09);
}
.glass-teal-grad {
  background: linear-gradient(140deg, rgba(10,80,80,0.75), rgba(20,130,130,0.60));
  border-color: rgba(255,255,255,0.09);
}
.glass-pink {
  background: linear-gradient(140deg, rgba(120,20,80,0.65), rgba(200,60,130,0.50));
  border-color: rgba(255,255,255,0.09);
}
.glass-teal {
  background: rgba(0,212,200,0.08);
  border-color: rgba(0,212,200,0.15);
}
.glass-blue {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.14);
}
.glass-orange {
  background: rgba(249,115,22,0.08);
  border-color: rgba(249,115,22,0.14);
}
.glass-dark {
  background: rgba(0,0,0,0.35);
  border-color: rgba(255,255,255,0.06);
}
.card-glow { border-color: rgba(0,212,200,0.22); }

/* ── BUTTONS (.btn): touch 48px min, ideal 56px, 16px type ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: 'Roboto', sans-serif;
  font-weight: 600;
  font-size: 1rem; /* 16px */
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: transform var(--motion-press) ease, background var(--motion-surface) ease, opacity 0.15s ease, filter 0.15s ease, box-shadow 0.12s ease;
  text-decoration: none;
  min-height: 48px;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
@media (min-width: 769px) {
  .btn { min-height: 56px; }
  .btn:not(.btn-block):not(.btn-inline) {
    width: auto;
    max-width: none;
  }
}
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.08); }
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Force reset ALL buttons from system defaults */
button {
  -webkit-appearance: none;
  appearance: none;
}
/* Global tap feedback (native + custom controls) */
button:active:not(:disabled) {
  transform: scale(0.97);
}
input[type="submit"]:active:not(:disabled),
input[type="button"]:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--spotify);
  color: var(--on-spotify);
  font-weight: 700;
  box-shadow: none;
  letter-spacing: 0.02em;
}
.btn-primary:active:not(:disabled) { background: var(--spotify-press); }

.btn-secondary {
  background: #1a1a26;
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.80);
}
.btn-secondary:active { background: #202030; }

.btn-green {
  background: var(--teal);
  color: #000;
  font-weight: 700;
}
.btn-green:hover { background: #12D18C; }

.btn-small {
  padding: 10px 16px;
  font-size: 0.875rem;
  border-radius: 12px;
  min-height: 44px;
  width: auto;
  max-width: none;
}

.btn-vote {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 10px 16px;
  min-height: 48px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, transform 0.1s;
  font-family: 'Roboto', sans-serif;
}
.btn-vote:hover { background: var(--bg4); color: var(--text); }
.btn-vote:active { transform: scale(0.97); }
.btn-vote.voted {
  background: rgba(29,185,84,0.12);
  border-color: rgba(29,185,84,0.3);
  color: var(--spotify);
}
/* Vote tap: press + bounce (social loop) */
@keyframes voteBtnTactile {
  0%   { transform: scale(0.92); }
  55%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.btn-vote.btn-vote--pop:not(:disabled) {
  animation: voteBtnTactile 0.24s var(--motion-ease);
}
/* Vote score / count pop when momentum shifts */
@keyframes zpeedCountPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.1); filter: brightness(1.3) saturate(1.15); }
  100% { transform: scale(1); filter: none; }
}
.vote-score.zpeed-pop,
.vote-count.zpeed-pop {
  animation: zpeedCountPop 0.26s var(--motion-ease) both;
}

/* ── BUTTON LAYOUT HELPERS ── */
.btn-primary, .btn-secondary, .btn-green,
.btn-spotify, .btn-spotify-connect {
  align-self: stretch;
}
.btn-block,
.btn-full {
  width: 100% !important;
  align-self: stretch !important;
  max-width: 100% !important;
}
@media (min-width: 769px) {
  .btn-align-center {
    align-self: center !important;
    width: auto !important;
    min-width: 200px;
  }
}

/* ── INPUTS: 16px, 56px height, 16px radius, horizontal padding only ── */
.input {
  width: 100%;
  height: var(--ui-tap-ideal);
  min-height: var(--ui-tap-ideal);
  max-height: var(--ui-tap-ideal);
  background: #1a1a1e !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 16px;
  padding: 0 16px;
  color: #ffffff !important;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem; /* 16px */
  line-height: 1.25;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  max-width: 100%;
}
.input--search {
  height: var(--ui-tap-ideal) !important;
  min-height: var(--ui-tap-ideal) !important;
  border-radius: 16px;
}
.input:focus {
  border-color: rgba(29,185,84,0.45) !important;
  background: #1e1e24 !important;
  box-shadow: 0 0 0 2px rgba(29,185,84,0.15);
}
.input::placeholder { color: rgba(255,255,255,0.30) !important; }
/* Kill browser autofill yellow */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #1a1a1e inset !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: rgba(255,255,255,0.12) !important;
  box-shadow: 0 0 0 1000px #1a1a1e inset !important;
}

.input-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; width: 100%; }
.input-group .input { margin: 0; flex: 1; min-width: 0; }
.input-group .btn { flex-shrink: 0; }
@media (min-width: 769px) {
  .input-group--row {
    flex-direction: row;
    align-items: center;
  }
  .input-group--row .input { flex: 1; }
  .input-group--row .btn {
    width: auto;
    min-width: 128px;
    max-width: 200px;
  }
}
/* Search row: input grow, submit aligned, 8px gap */
.search-field-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
  gap: 8px;
  box-sizing: border-box;
}
.search-field-row .input,
.search-field-row .input--search {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.search-field-row .btn-search {
  width: 100%;
}
@media (min-width: 769px) {
  .search-field-row {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
  }
  .search-field-row .input,
  .search-field-row .input--search {
    flex: 1 1 0;
    min-width: 0;
  }
  .search-field-row .btn-search {
    width: var(--ui-tap-ideal);
    flex: 0 0 var(--ui-tap-ideal);
  }
}

/* Mobile: full-width primary .btn, stack search & groups (not compact .btn-small controls) */
@media (max-width: 768px) {
  .btn:not(.btn-inline):not(.btn-small),
  .btn-block {
    width: 100% !important;
    max-width: 100% !important;
  }
  .search-field-row {
    flex-direction: column;
    align-items: stretch;
  }
  .search-field-row .btn-search {
    width: 100% !important;
  }
  .input-group--row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── LABEL (min 14px) ── */
.label {
  font-size: var(--font-sec);
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
  font-weight: 700;
}

/* ── BADGE / PILL ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a1a28;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}
.badge.active {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.22);
  color: var(--green);
}
.badge.purple {
  background: rgba(0,212,200,0.11);
  border-color: rgba(0,212,200,0.22);
  color: var(--purple-light);
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── TAB BAR (large touch targets) ── */
.tab-bar {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  min-height: 0;
  background: #111119;
  border-radius: 16px;
  padding: 6px 4px;
  gap: 2px;
  margin-bottom: var(--space-y-lg);
  border: 1px solid rgba(255,255,255,0.08);
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--ui-tap-ideal);
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-family: 'Roboto', sans-serif;
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--motion-press) ease, background 0.2s ease, color 0.2s ease, opacity 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn:active { transform: scale(0.97); }
@media (min-width: 769px) {
  .tab-btn { min-height: 60px; }
}
.tab-btn .tab-icon {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-btn .tab-icon svg { width: 24px; height: 24px; display: block; }
.tab-btn .tab-label {
  font-size: 0.6875rem; /* 11px — tight tab strip */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1px;
}
@media (min-width: 400px) {
  .tab-btn .tab-label { font-size: var(--font-sec); }
}
.tab-btn.active {
  background: rgba(29,185,84,0.12);
  color: var(--spotify);
  box-shadow: none;
}
.tab-btn:not(.active):active {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
}
.tab-btn .tab-badge {
  position: absolute;
  top: 5px; right: 8px;
  background: var(--green);
  color: #000;
  font-size: 0.44rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 99px;
  display: none;
  min-width: 14px;
  text-align: center;
}
.tab-btn .tab-badge.show { display: block; }
.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; }

/* ── SECTION TITLE (min 14px) ── */
.section-title {
  font-size: var(--font-sec);
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: var(--space-y-sm) 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── TRACK CARDS: tap row, search rows use space-between (cover + text | +) ── */
.track-card,
.search-result,
.host-result {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.host-result .host-result-info,
.search-result > div:not(.btn-add-plus) {
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
}
.queue-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}
.track-card,
.queue-item,
.search-result,
.host-result {
  width: 100%;
  min-height: var(--track-min-h);
  background: #141416;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: var(--space-y-sm);
  box-sizing: border-box;
  transition: transform var(--motion-surface) ease, background var(--motion-surface) ease, border-color 0.15s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  user-select: none;
}
/* Desktop: lift + light surface (fine pointer) */
@media (hover: hover) and (min-width: 769px) {
  .track-card:hover:not(:active),
  .search-result:hover:not(:active),
  .host-result:hover:not(:active),
  .queue-item.track-card:hover:not(:active) {
    transform: scale(1.01);
    background: rgba(255,255,255,0.05);
  }
}
/* Single-purpose interactive rows */
.search-result,
.host-result { cursor: pointer; }
.search-result:active:not(.track-card--adding),
.host-result:active:not(.track-card--adding) {
  transform: scale(0.98);
}
.queue-item { cursor: default; }
/* Add track: tactile confirm — scale + green flash + check (~200ms) */
@keyframes trackAddFun {
  0% {
    transform: scale(0.96);
    background: rgba(34, 197, 94, 0.15) !important;
  }
  55% { transform: scale(1.02); }
  100% {
    transform: scale(1);
    background: #141416 !important;
  }
}
@keyframes addCheckFlash {
  0%   { opacity: 0; transform: translateY(-50%) scale(0.5); }
  45%  { opacity: 1; transform: translateY(-50%) scale(1.05); }
  100% { opacity: 0; transform: translateY(-50%) scale(0.85); }
}
.track-card--adding {
  z-index: 1;
  animation: trackAddFun 0.2s var(--motion-ease) both;
  border-color: rgba(34, 197, 94, 0.45) !important;
  overflow: visible;
}
.track-card--adding::after {
  content: '✓';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-top: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.95);
  color: #0a0a0a;
  font-size: 13px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: translateY(-50%) scale(0.5);
  animation: addCheckFlash 0.22s var(--motion-ease) both;
}
/* Queue: state readable at a glance (no layout change) */
.queue-item.status-accepted {
  border-color: rgba(34, 197, 94, 0.32);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.1);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.09) 0%, #141416 50%);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}
.queue-item.status-spotify_queued {
  opacity: 0.93;
  border-color: rgba(30, 215, 96, 0.2);
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.queue-item.status-pending {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
/* Spec: fine-pointer hover on .track-card only (queue / shared card chrome) */
@media (hover: hover) {
  .track-card:hover:not(:active) {
    transform: scale(1.01);
  }
}
/* Dead-time nudge: subtle affordance (class toggled from JS) */
body.zpeed-idle .zpeed-nudge-target.vote-card {
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.4);
  border-color: rgba(29, 185, 84, 0.3);
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}
body.zpeed-idle #searchInput.zpeed-nudge-target,
body.zpeed-idle #hostSearchInput.zpeed-nudge-target {
  box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.28);
  border-color: rgba(29, 185, 84, 0.35) !important;
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}
body.zpeed-idle #queueList .queue-item.zpeed-nudge-target {
  box-shadow: 0 0 0 1px rgba(29, 185, 84, 0.38);
  border-color: rgba(29, 185, 84, 0.28);
  transition: box-shadow 0.5s ease, border-color 0.5s ease;
}
.queue-item.playing {
  background: rgba(29,185,84,0.08);
  border-color: rgba(29,185,84,0.22);
}
.queue-item .queue-thumb {
  align-self: center;
  margin-top: 0;
}
.queue-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.queue-item .queue-info { flex: 1; min-width: 0; align-self: stretch; }
.queue-title {
  font-weight: 600;
  font-size: var(--font-title);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.queue-meta { font-size: var(--font-sec); color: var(--text2); margin-top: 4px; line-height: 1.3; }
.queue-proposer { font-size: var(--font-sec); color: var(--purple-light); margin-top: 3px; }
.queue-item--actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: var(--ui-tap-ideal);
  align-self: center;
  margin-top: 0;
}
/* Add (+) — circular, 48–56px, icon optically centered (card is the tap target) */
.btn-add-plus {
  width: var(--ui-tap-ideal);
  height: var(--ui-tap-ideal);
  min-width: var(--ui-tap);
  min-height: var(--ui-tap);
  max-width: var(--ui-tap-ideal);
  max-height: var(--ui-tap-ideal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(29,185,84,0.2);
  border: 1px solid rgba(29,185,84,0.4);
  color: var(--spotify);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 0;
  flex-shrink: 0;
  align-self: center;
  padding: 0 0 1px 0; /* optical center for + */
  pointer-events: none;
  box-sizing: border-box;
}
.vote-count {
  font-family: 'Roboto', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--spotify);
  min-width: 28px;
  text-align: center;
}

/* ══════════════════════════════════════════
   NOW PLAYING — Glassmorphism Card (ref DA)
   ══════════════════════════════════════════ */
.now-playing {
  background: rgba(8, 20, 28, 0.80);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 24px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Top row: art + text + badge */
.np-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.np-thumb {
  width: 90px; height: 90px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}

.np-text { flex: 1; min-width: 0; padding-top: 2px; }

.np-title {
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-channel {
  font-size: 0.84rem;
  color: var(--text2);
  font-weight: 500;
  margin-bottom: 7px;
}

.np-meta {
  font-size: 0.72rem;
  color: var(--text3);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Green checkmark badge (top-right) */
.np-badge {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #22c55e;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(34,197,94,0.40);
}

/* Bottom row: circular controls + CTA */
.np-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.np-controls { display: flex; gap: 8px; align-items: center; }

.np-ctrl-btn {
  width: var(--ui-tap);
  height: var(--ui-tap);
  min-width: var(--ui-tap);
  min-height: var(--ui-tap);
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.14s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  color: rgba(255,255,255,0.72);
  flex-shrink: 0;
}
.np-ctrl-btn:active { transform: scale(0.97); background: rgba(255,255,255,0.15); }

/* "+ Queue" CTA pill */
.np-btn-cta {
  background: var(--purple);
  color: #061014;
  border-radius: 99px;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 3px 12px rgba(0,212,200,0.30);
}
.np-btn-cta:active { transform: scale(0.97); }

/* ── QR WRAPPER ── */
.qr-panel {
  margin-bottom: 20px;
  text-align: center;
}
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.qr-card {
  background: #FFFFFF;
  padding: 18px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.05);
}
.qr-wrapper canvas {
  background: #FFFFFF;
  border-radius: 0;
  display: block;
  width: 260px;
  height: 260px;
  min-width: 200px;
  min-height: 200px;
  max-width: 280px;
  max-height: 280px;
}
.qr-helper-text {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.qr-link-preview {
  margin-bottom: 0;
  font-size: 0.75rem;
  color: var(--text2);
  text-align: center;
  word-break: break-all;
  opacity: 0.9;
}

/* QR tab: primary actions (copy + share) — rhythm separate from destructive */
.qr-actions-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-top: 20px;
}
.qr-actions-group .btn {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 18px;
  font-size: 0.94rem;
}
.qr-actions-group .btn + .btn {
  margin-top: 11px;
}
@media (min-width: 769px) {
  .qr-actions-group .btn {
    min-height: 48px;
  }
}
.qr-link-preview #qrLinkText {
  color: rgba(255,255,255,0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.session-code {
  font-family: 'Roboto', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 10px;
}

.search-thumb {
  width: 56px; height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  align-self: center;
}

/* ── PLATFORMS ── */
.platforms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.platform-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px;
  min-height: var(--ui-tap-ideal);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #14141e;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  width: 100%;
  text-align: left;
}
.platform-btn:active { background: #1a1a28; transform: scale(0.97); }
.platform-btn .plat-icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.platform-btn .plat-icon svg { width: 36px; height: 36px; }
.platform-btn .plat-info { flex: 1; min-width: 0; }
.platform-btn .plat-name { font-size: 0.95rem; font-weight: 700; }
.platform-btn .plat-status { font-size: 0.72rem; color: var(--text2); margin-top: 3px; }
.platform-btn .plat-check { font-size: 1rem; flex-shrink: 0; }
/* Connected state */
.plat-youtube.connected  { border-color: rgba(255,0,0,0.25);    background: rgba(255,0,0,0.06); }
.plat-spotify.connected  { border-color: rgba(30,215,96,0.25);  background: rgba(30,215,96,0.06); }
.plat-deezer.connected   { border-color: rgba(239,84,102,0.25); background: rgba(239,84,102,0.06); }

/* ── SPEAKER BADGE ── */
.speaker-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--green-dim);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── MINI PLAYER (sticky now playing — iOS bar feel) ── */
.mini-player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(10, 10, 12, 0.88);
  border-top: 1px solid rgba(255,255,255,0.05);
  z-index: 200;
  padding: 12px max(16px, env(safe-area-inset-left)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right));
  transform: translateY(100%) translateZ(0);
  transition: transform 0.28s var(--motion-ease);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
  max-width: 100%;
}
.mini-player.visible { transform: translateY(0) translateZ(0); }
/* Track change: soft cross-fade in the text block */
.mini-player.mini-player--track-swap .mini-thumb,
.mini-player.mini-player--track-swap .mini-info {
  animation: miniMetaSwap 0.2s var(--motion-ease) both;
}
@keyframes miniMetaSwap {
  0%   { opacity: 0.5; }
  100% { opacity: 1; }
}
.mini-player-inner {
  max-width: var(--max-app);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--ui-tap);
}
.mini-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.mini-info { flex: 1; min-width: 0; }
.mini-title { font-size: var(--font-sec); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: var(--font-sec); color: var(--text2); margin-top: 2px; }
.mini-controls { display: flex; gap: 10px; flex-shrink: 0; }
.mini-controls .btn-small {
  width: var(--ui-tap);
  height: var(--ui-tap);
  min-width: var(--ui-tap);
  min-height: var(--ui-tap);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.mini-controls .btn-small:active { transform: scale(0.97); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.60);
  display: flex;
  align-items: flex-end;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: #13131d;
  border-radius: 26px 26px 0 0;
  border-top: 1px solid rgba(255,255,255,0.09);
  padding: 20px 20px 40px;
  width: 100%; max-width: 480px; margin: 0 auto;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column; gap: 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.14); margin: 0 auto 20px; }
.modal-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 18px; }
.share-link {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: var(--purple-light);
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
}
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── NOTIFICATION SYSTEM ── */
/* Legacy #toast kept for backward compat — hidden, replaced by .notif-stack */
#toast { display: none; }

/* Stack container — top center */
#notifStack {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(340px, calc(100vw - 32px));
}

/* Individual notification */
.notif {
  width: 100%;
  background: rgba(14, 28, 36, 0.90);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.45),
    0 1px 0 rgba(255,255,255,0.04) inset;
  pointer-events: auto;
  cursor: default;

  /* Enter: slide down + fade */
  animation: notifEnter 0.4s cubic-bezier(.34,1.56,.64,1) forwards;
  will-change: transform, opacity;
}
.notif.leaving {
  animation: notifLeave 0.28s cubic-bezier(.32,.72,0,1) forwards;
}

@keyframes notifEnter {
  from { opacity: 0; transform: translateY(-18px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)     scale(1);    }
}
@keyframes notifLeave {
  from { opacity: 1; transform: translateY(0)    scale(1);    max-height: 80px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateY(-8px) scale(0.96); max-height: 0;   margin-bottom: -8px; }
}

/* Icon */
.notif-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1;
}

/* Text block */
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-sub {
  font-size: 0.72rem;
  color: var(--text2);
  line-height: 1.3;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar at bottom of notif */
.notif-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  border-radius: 0 0 18px 18px;
  background: rgba(0,212,200,0.5);
  transition: width linear;
}

/* Variants */
.notif.notif-success { border-color: rgba(34,197,94,0.25); }
.notif.notif-success .notif-title { color: #6ee7b7; }
.notif.notif-warn  { border-color: rgba(251,146,60,0.25); }
.notif.notif-error { border-color: rgba(239,68,68,0.25); }
.notif.notif-ai    { border-color: rgba(0,212,200,0.30); background: rgba(0,40,40,0.88); }
.notif.notif-ai .notif-title { color: var(--purple-light); font-style: italic; }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 48px 16px; color: var(--text2); }
.empty-icon { width: 3.2rem; height: 3.2rem; margin: 0 auto 14px; opacity: 0.35; display: flex; align-items: center; justify-content: center; }
.empty-icon svg { width: 100%; height: 100%; }
.empty-text { font-size: var(--font-sec); line-height: 1.55; }

/* ── YOUTUBE PLAYER ── */
#yt-player {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}
#yt-player iframe { width: 100%; height: 100%; }

/* ── DIVIDER ── */
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text3); font-size: 0.78rem;
  margin: 8px 0; font-weight: 500;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── GUEST ITEMS ── */
.guest-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,0.40), 0 0 0 1.5px rgba(255,255,255,0.10);
}
.guest-avatar img {
  width: 100%; height: 100%; display: block; border-radius: 50%;
}
.guest-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.guest-item:last-child { border-bottom: none; }

/* ── VOTE CARD ── */
.vote-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  min-height: var(--track-min-h);
  margin-bottom: var(--space-y-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-y-sm);
  align-items: stretch;
  transition: background 0.15s, box-shadow 0.35s ease, border-color 0.25s ease;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}
@media (hover: hover) and (min-width: 769px) {
  .vote-card:hover { background: rgba(255,255,255,0.05); }
}
.vote-card-info { flex: 1; min-width: 0; }
.vote-card-title {
  font-weight: 600;
  font-size: var(--font-title);
  line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vote-card-meta { font-size: var(--font-sec); color: var(--text2); margin-top: 4px; line-height: 1.35; }
.vote-card-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.vote-score { font-family: 'Roboto', sans-serif; font-size: 1rem; font-weight: 800; min-width: 22px; text-align: center; }
.vote-score.pos { color: var(--green); }
.vote-score.neg { color: var(--red); }

/* ══ Lightweight social game layer (momentum, heat, clutch, top3, reactions) ══ */
.zpeed-top3-wrap { margin: 0 0 10px; min-height: 0; }
.zpeed-top3 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text2);
}
.zpeed-top3-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  white-space: nowrap;
  max-width: 100%;
}
.zpeed-momentum-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.zpeed-momentum {
  flex: 1;
  min-width: 0;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.zpeed-momentum-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(29,185,84,0.5), var(--spotify));
  width: 0%;
  transition: width 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 0 10px rgba(29,185,84,0.25);
}
.zpeed-momentum-lbl {
  font-size: 0.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text2);
  flex-shrink: 0;
}
/* Vote heat tiers (vote count vs threshold) */
.vote-card.zpeed-heat-low { box-shadow: none; }
.vote-card.zpeed-heat-med {
  box-shadow: 0 0 18px rgba(201, 123, 46, 0.1);
  border-color: rgba(255,255,255,0.1);
}
.vote-card.zpeed-heat-high {
  box-shadow: 0 0 22px rgba(232, 93, 42, 0.14);
  border-color: rgba(232, 93, 42, 0.22);
}
.vote-card.zpeed-heat-blaze {
  box-shadow: 0 0 26px rgba(255, 59, 31, 0.18);
  border-color: rgba(255, 59, 31, 0.28);
}
.queue-item.track-card.zpeed-heat-med { box-shadow: 0 0 16px rgba(201, 123, 46, 0.08); }
.queue-item.track-card.zpeed-heat-high { box-shadow: 0 0 20px rgba(232, 93, 42, 0.12); }
.queue-item.track-card.zpeed-heat-blaze { box-shadow: 0 0 24px rgba(255, 59, 31, 0.16); }
@keyframes zpeedClutchPulse {
  0% { box-shadow: 0 0 0 0 rgba(29,185,84,0.5); border-color: rgba(29,185,84,0.55); transform: scale(0.985); }
  45% { transform: scale(1.012); }
  100% { box-shadow: 0 0 0 12px rgba(29,185,84,0); border-color: var(--border); transform: scale(1); }
}
.vote-card--clutch,
.queue-item--clutch {
  animation: zpeedClutchPulse 0.7s ease-out 1;
}
.zpeed-validated-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--on-spotify);
  background: var(--spotify);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 3px 7px;
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  z-index: 6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.vote-card--validated-show .zpeed-validated-tag,
.queue-item--validated-show .zpeed-validated-tag {
  opacity: 1;
  transform: scale(1);
}
.zpeed-react-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
  z-index: 8;
  min-height: 0;
}
.zpeed-react-float {
  display: inline-block;
  font-size: 1.2rem;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  animation: zpeedReactFloat 1.1s ease-out forwards;
}
@keyframes zpeedReactFloat {
  0%   { transform: translateY(6px) scale(0.55); opacity: 0; }
  22%  { transform: translateY(0) scale(1.08); opacity: 1; }
  100% { transform: translateY(-10px) scale(0.92); opacity: 0; }
}

/* ── TRACK PREVIEW ── */
.track-preview {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: var(--purple-dim);
  border: 1px solid rgba(0,212,200,0.20);
  font-size: 0.75rem; flex-shrink: 0; color: var(--purple-light);
  transition: background 0.15s;
}
.track-preview:hover { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ── END BTN ── */
.end-btn {
  background: transparent;
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--red);
  padding: 12px 28px;
  border-radius: 99px;
  font-family: 'Roboto', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
  align-self: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.end-btn:hover { background: rgba(239,68,68,0.06); }

.terminate-session-btn {
  margin-top: 28px;
  opacity: 0.92;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 22px;
  font-size: 0.84rem;
  font-weight: 600;
  border-color: rgba(239, 68, 68, 0.18);
  color: rgba(248, 113, 113, 0.92);
}
.terminate-session-btn:hover {
  background: rgba(239, 68, 68, 0.05);
}
@media (min-width: 769px) {
  .terminate-session-btn {
    min-height: 48px;
  }
}

/* ── PROFIL STAT ── */
.profil-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.profil-stat:last-child { border-bottom: none; }

/* ── PRICE BTNS ── */
.price-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-btn {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}
.price-btn:hover { background: var(--purple); border-color: var(--purple); }
.price-btn .price { font-size: 1.05rem; color: var(--green); display: block; margin-bottom: 2px; }

/* ── PAYWALL BANNER ── */
.paywall-banner { display: none; }

/* ── PLATFORM HEADER ── */
.platform-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 2px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 99px; }

/* ── CONTAINER BOTTOM PADDING FOR MINI PLAYER ── */
/* 72px hauteur barre + 12px padding haut + safe area home bar */
.container.with-mini {
  padding-bottom: calc(var(--mini-player-height) + var(--safe-bottom) + 24px);
}

/* Ensure QR tab CTA stack never hides behind fixed bottom bars */
#panel-qr {
  padding-bottom: calc(var(--mini-player-height) + var(--safe-bottom) + 24px);
}

/* Roboto bold emphasis */
.section-title,
.label,
.btn,
.badge,
.tab-btn .tab-label,
.role-card .role-name,
.end-title,
.stat-value {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
}

/* ══════════════════════════════════════════════
   ZPEED — .btn-search matches .input height, skeletons
   ══════════════════════════════════════════════ */
.btn-search {
  flex-shrink: 0;
  min-height: var(--ui-tap-ideal);
  height: var(--ui-tap-ideal);
  border-radius: 16px; /* same family as .input--search */
  border: none;
  cursor: pointer;
  background: var(--spotify);
  color: var(--on-spotify);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--motion-press) ease, background var(--motion-surface) ease, opacity 0.15s ease;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 700;
  box-sizing: border-box;
}
.search-field-row .btn-search {
  align-self: center;
}
.btn-search:hover:not(:disabled) { background: var(--spotify-hover); }
.btn-search:active:not(:disabled) { transform: scale(0.97); }
.btn-search:disabled { opacity: 0.45; }
.btn-search svg { stroke: currentColor; }
@media (min-width: 769px) {
  .search-wrap .search-suggestions {
    width: calc(100% - 64px);
    max-width: 100%;
  }
}
.search-wrap { position: relative; max-width: 100%; }
.search-wrap .search-suggestions {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  left: 0;
  right: auto;
  box-shadow: none;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Spotify OAuth CTA — extends .btn + brand */
.btn-spotify,
a.btn-spotify {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--ui-tap-ideal);
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: #1db954;
  color: #000;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem; /* 16px */
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform var(--motion-press) ease, background var(--motion-surface) ease, opacity 0.15s ease, filter 0.15s ease;
}
.btn-spotify:hover:not(:disabled) { background: #1ed760; }
.btn-spotify:active:not(:disabled) { transform: scale(0.97); }
.btn-spotify:disabled { opacity: 0.45; cursor: not-allowed; }

/* Loading on buttons (add .is-loading) */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: ui-spin 0.65s linear infinite;
  color: rgba(0,0,0,0.5);
}
.btn.btn-primary.is-loading::after,
.btn-spotify.is-loading::after {
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: #000;
}
.btn-search.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}
.btn-search.is-loading::after {
  content: '';
  position: absolute;
  width: 1.1rem; height: 1.1rem;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: ui-spin 0.65s linear infinite;
}
@keyframes ui-spin { to { transform: rotate(360deg); } }

/* Track / search skeletons (align with .track-card metrics) */
.skeleton-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  min-height: var(--track-min-h);
  border-radius: 12px;
  background: #141416;
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}
.skeleton-avatar {
  width: 56px; height: 56px; border-radius: 10px;
  background: linear-gradient(90deg, #1e1e22 0%, #2a2a32 50%, #1e1e22 100%);
  background-size: 200% 100%;
  animation: sk-shine 1.1s ease-in-out infinite;
  flex-shrink: 0;
}
.skeleton-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #1e1e22 0%, #2a2a32 50%, #1e1e22 100%);
  background-size: 200% 100%;
  animation: sk-shine 1.1s ease-in-out infinite;
}
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-60 { width: 60%; }
@keyframes sk-shine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Reaction strip */
.btn-react {
  min-height: 48px;
  font-size: 1.1rem;
}

/* Large play / CTA on track rows (host queue) */
.ui-btn-play {
  width: var(--ui-tap) !important;
  height: var(--ui-tap) !important;
  min-width: var(--ui-tap) !important;
  min-height: var(--ui-tap) !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1rem !important;
}
.ui-btn-play:active { transform: scale(0.97); }

/* Prevent any panel from horizontal scroll */
.tab-panel, .search-wrap, #searchResults, #hostSearchResults {
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════
   iOS-like: list enter + reduced motion (no layout / class changes)
   ══════════════════════════════════════════════════════════════ */
@keyframes zpeedRowIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
#searchResults .search-result,
#hostSearchResults .search-result,
#hostSearchResults .host-result,
#playlistsList .search-result,
#playlistTracksList .search-result,
#myProposalsList .queue-item,
.skeleton-list .skeleton-row {
  animation: zpeedRowIn var(--motion-appear) var(--motion-ease) both;
}
#searchResults .search-result:nth-child(1),
#hostSearchResults .search-result:nth-child(1),
#hostSearchResults .host-result:nth-child(1),
#playlistsList .search-result:nth-child(1),
#playlistTracksList .search-result:nth-child(1),
#myProposalsList .queue-item:nth-child(1),
.skeleton-list .skeleton-row:nth-child(1) { animation-delay: 0s; }
#searchResults .search-result:nth-child(2),
#hostSearchResults .search-result:nth-child(2),
#hostSearchResults .host-result:nth-child(2),
#playlistsList .search-result:nth-child(2),
#playlistTracksList .search-result:nth-child(2),
#myProposalsList .queue-item:nth-child(2),
.skeleton-list .skeleton-row:nth-child(2) { animation-delay: 0.02s; }
#searchResults .search-result:nth-child(3),
#hostSearchResults .search-result:nth-child(3),
#hostSearchResults .host-result:nth-child(3),
#playlistsList .search-result:nth-child(3),
#playlistTracksList .search-result:nth-child(3),
#myProposalsList .queue-item:nth-child(3),
.skeleton-list .skeleton-row:nth-child(3) { animation-delay: 0.04s; }
#searchResults .search-result:nth-child(4),
#hostSearchResults .search-result:nth-child(4),
#hostSearchResults .host-result:nth-child(4),
#playlistsList .search-result:nth-child(4),
#playlistTracksList .search-result:nth-child(4),
#myProposalsList .queue-item:nth-child(4),
.skeleton-list .skeleton-row:nth-child(4) { animation-delay: 0.06s; }
#searchResults .search-result:nth-child(5),
#hostSearchResults .search-result:nth-child(5),
#hostSearchResults .host-result:nth-child(5),
#playlistsList .search-result:nth-child(5),
#playlistTracksList .search-result:nth-child(5),
#myProposalsList .queue-item:nth-child(5),
.skeleton-list .skeleton-row:nth-child(5) { animation-delay: 0.08s; }
#searchResults .search-result:nth-child(6),
#hostSearchResults .search-result:nth-child(6),
#hostSearchResults .host-result:nth-child(6),
#playlistsList .search-result:nth-child(6),
#playlistTracksList .search-result:nth-child(6),
#myProposalsList .queue-item:nth-child(6),
.skeleton-list .skeleton-row:nth-child(6) { animation-delay: 0.1s; }
#searchResults .search-result:nth-child(7),
#hostSearchResults .search-result:nth-child(7),
#hostSearchResults .host-result:nth-child(7),
#playlistsList .search-result:nth-child(7),
#playlistTracksList .search-result:nth-child(7),
#myProposalsList .queue-item:nth-child(7),
.skeleton-list .skeleton-row:nth-child(7) { animation-delay: 0.12s; }
#searchResults .search-result:nth-child(8),
#hostSearchResults .search-result:nth-child(8),
#hostSearchResults .host-result:nth-child(8),
#playlistsList .search-result:nth-child(8),
#playlistTracksList .search-result:nth-child(8),
#myProposalsList .queue-item:nth-child(8),
.skeleton-list .skeleton-row:nth-child(8) { animation-delay: 0.14s; }
#searchResults .search-result:nth-child(9),
#hostSearchResults .search-result:nth-child(9),
#hostSearchResults .host-result:nth-child(9),
#playlistsList .search-result:nth-child(9),
#playlistTracksList .search-result:nth-child(9),
#myProposalsList .queue-item:nth-child(9),
.skeleton-list .skeleton-row:nth-child(9) { animation-delay: 0.16s; }
#searchResults .search-result:nth-child(10),
#hostSearchResults .search-result:nth-child(10),
#hostSearchResults .host-result:nth-child(10),
#playlistsList .search-result:nth-child(10),
#playlistTracksList .search-result:nth-child(10),
#myProposalsList .queue-item:nth-child(10),
.skeleton-list .skeleton-row:nth-child(10) { animation-delay: 0.18s; }
#searchResults .search-result:nth-child(11),
#hostSearchResults .search-result:nth-child(11),
#hostSearchResults .host-result:nth-child(11),
#playlistsList .search-result:nth-child(11),
#playlistTracksList .search-result:nth-child(11),
#myProposalsList .queue-item:nth-child(11),
.skeleton-list .skeleton-row:nth-child(11) { animation-delay: 0.2s; }
#searchResults .search-result:nth-child(12),
#hostSearchResults .search-result:nth-child(12),
#hostSearchResults .host-result:nth-child(12),
#playlistsList .search-result:nth-child(12),
#playlistTracksList .search-result:nth-child(12),
#myProposalsList .queue-item:nth-child(12),
.skeleton-list .skeleton-row:nth-child(12) { animation-delay: 0.22s; }

#voteList .vote-card {
  animation: zpeedRowIn var(--motion-appear) var(--motion-ease) both;
}
#voteList .vote-card:nth-child(1) { animation-delay: 0s; }
#voteList .vote-card:nth-child(2) { animation-delay: 0.02s; }
#voteList .vote-card:nth-child(3) { animation-delay: 0.04s; }
#voteList .vote-card:nth-child(4) { animation-delay: 0.06s; }
#voteList .vote-card:nth-child(5) { animation-delay: 0.08s; }
#voteList .vote-card:nth-child(6) { animation-delay: 0.1s; }
#voteList .vote-card:nth-child(7) { animation-delay: 0.12s; }
#voteList .vote-card:nth-child(8) { animation-delay: 0.14s; }
#voteList .vote-card:nth-child(9) { animation-delay: 0.16s; }
#voteList .vote-card:nth-child(10) { animation-delay: 0.18s; }
#voteList .vote-card:nth-child(11) { animation-delay: 0.2s; }
#voteList .vote-card:nth-child(12) { animation-delay: 0.22s; }

@media (prefers-reduced-motion: reduce) {
  .track-card--adding { animation: none; opacity: 1 !important; }
  .track-card--adding::after { display: none; }
  .btn-vote--pop { animation: none; }
  .vote-score.zpeed-pop,
  .vote-count.zpeed-pop { animation: none; }
  .mini-player.mini-player--track-swap .mini-thumb,
  .mini-player.mini-player--track-swap .mini-info { animation: none; }
  #voteList .vote-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  #searchResults .search-result,
  #hostSearchResults .search-result,
  #hostSearchResults .host-result,
  #playlistsList .search-result,
  #playlistTracksList .search-result,
  #myProposalsList .queue-item,
  #queueList .queue-item,
  .skeleton-list .skeleton-row {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .tab-btn { transition: none; }
  .mini-player { transition: transform 0.15s ease; }
  .vote-card--clutch,
  .queue-item--clutch { animation: none; }
  .zpeed-react-float { animation: none; opacity: 0; }
  .zpeed-momentum-fill { transition: none; }
}
