/* ==========================================================================
   Heycout — système de design
   Le ciel est commun (fond étoilé, constant), l'astre est personnel (la
   pochette éclaire localement son objet), le rouge néon est réservé à l'action.
   Organisation du parcours calquée sur [untitled]. Voir DESIGN.md.
   ========================================================================== */

:root {
  --sky: #050508;

  --surface: rgba(19, 19, 25, 0.74);
  --surface-2: rgba(32, 32, 40, 0.86);
  --surface-3: rgba(46, 46, 57, 0.92);
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.15);

  --text: #f4f4f7;
  --text-muted: #9a9aa8;
  --text-faint: #62626e;

  --accent: #ff1e3d;
  --accent-hover: #ff4560;
  --accent-soft: rgba(255, 30, 61, 0.14);
  --accent-glow: rgba(255, 30, 61, 0.45);

  --danger: #ff5a6e;
  --danger-soft: rgba(255, 90, 110, 0.13);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  --shadow-card: 0 14px 34px rgba(0, 0, 0, 0.62);
  --shadow-pop: 0 22px 54px rgba(0, 0, 0, 0.72);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Le ciel étoilé ------------------------------------------------------- */

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

body::before {
  background-color: var(--sky);
  background-image:
    radial-gradient(1px 1px at 18px 42px, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 96px 128px, rgba(255, 255, 255, 0.42), transparent),
    radial-gradient(1px 1px at 172px 24px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 58px 196px, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 214px 162px, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 136px 88px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 44px 302px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 286px 244px, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(1px 1px at 342px 70px, rgba(255, 255, 255, 0.46), transparent),
    radial-gradient(1px 1px at 190px 340px, rgba(255, 255, 255, 0.28), transparent),
    radial-gradient(760px 420px at 78% -6%, rgba(255, 30, 61, 0.05), transparent 70%),
    radial-gradient(680px 460px at 12% 108%, rgba(90, 80, 200, 0.05), transparent 72%);
  background-size:
    240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px, 240px 240px,
    390px 390px, 390px 390px, 390px 390px, 390px 390px,
    100% 100%, 100% 100%;
}

body::after {
  background-image:
    radial-gradient(1.6px 1.6px at 62px 88px, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.4px 1.4px at 258px 210px, rgba(255, 246, 235, 0.85), transparent),
    radial-gradient(1.5px 1.5px at 420px 46px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.3px 1.3px at 150px 402px, rgba(235, 240, 255, 0.85), transparent);
  background-size: 620px 620px, 620px 620px, 620px 620px, 620px 620px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 1; } }

img { max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; font-weight: 700; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: var(--r-pill); border: 3px solid transparent; background-clip: content-box; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Marque
   ========================================================================== */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.045em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  background: radial-gradient(circle at 34% 30%, #ff6b7f, var(--accent) 42%, #6d0016 78%, #1a0207);
  box-shadow: 0 0 16px var(--accent-glow);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 41%;
  border-radius: 50%;
  background: var(--sky);
}

/* Pochette par défaut du Mini Studio : le ciel inversé (blanc, étoiles noires). */
/* ==========================================================================
   Pochettes et disque
   ========================================================================== */

.cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--cover-bg, linear-gradient(145deg, #2a2a34, #14141a));
  flex-shrink: 0;
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cover-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
}

.disc {
  position: relative;
  display: block;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cover-bg, conic-gradient(from 210deg, #3a3a46, #16161c, #3a3a46));
  box-shadow: 0 0 26px var(--glow, transparent), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.disc img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Sillons discrets par-dessus la pochette, puis le trou central. */
.disc::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(0, 0, 0, 0) 0 3px, rgba(0, 0, 0, 0.09) 3px 4px);
}
.disc::after {
  content: "";
  position: absolute;
  inset: 41%;
  z-index: 2;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), inset 0 0 6px rgba(0, 0, 0, 0.9);
}
.disc.is-spinning { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Boutons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease),
              border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; transform: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 0 18px var(--accent-glow); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 26px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-subtle { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-subtle:hover { background: rgba(255, 255, 255, 0.13); }
.btn-danger { background: var(--danger); color: #240a0e; }
.btn-danger:hover { background: #ff7c8c; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* Boutons carrés arrondis de la barre du haut */
.round-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--text);
  overflow: hidden;
  flex-shrink: 0;
  transition: background 0.15s var(--ease), transform 0.12s var(--ease);
}
.round-btn:hover { background: var(--surface-3); }
.round-btn:active { transform: scale(0.95); }
.round-btn img { width: 100%; height: 100%; object-fit: cover; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.icon-btn.is-active { color: var(--accent); }

/* ==========================================================================
   Barre du haut + conteneur de vue
   ========================================================================== */

.appbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 40px 18px;
  background: linear-gradient(to bottom, rgba(5, 5, 8, 0.92) 55%, rgba(5, 5, 8, 0));
}
.appbar-spacer { flex: 1; }
.appbar-actions { display: flex; align-items: center; gap: 10px; }

.search-field {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 16px;
  border-radius: 15px;
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-muted);
}
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text);
}

.view {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 40px 180px;
  outline: none;
}

/* ==========================================================================
   Accueil : grille de projets
   ========================================================================== */

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  justify-content: center;
  gap: 40px 64px;
  padding-top: 8px;
}

.card { position: relative; min-width: 0; }

.card-art {
  position: relative;
  width: 200px;
  height: 200px;
  cursor: pointer;
}
.card-art .cover {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card-art:hover .cover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 40px var(--glow, transparent);
}

.card-play {
  position: absolute;
  right: -12px;
  bottom: -12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: rgba(30, 30, 38, 0.94);
  backdrop-filter: blur(10px);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transition: background 0.15s var(--ease), transform 0.12s var(--ease), box-shadow 0.15s var(--ease);
}
.card-play:hover { background: var(--accent); box-shadow: 0 0 24px var(--accent-glow); }
.card-play:active { transform: scale(0.94); }
.card.is-playing .card-play { background: var(--accent); box-shadow: 0 0 24px var(--accent-glow); }

.card-title {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 3px;
}
.card-sub {
  color: var(--text-muted);
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-sub .share-mark { color: var(--text-faint); display: inline-grid; }

.home-add-wrap { display: flex; justify-content: center; margin-top: 44px; }
.add-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 200px;
  height: 58px;
  padding: 0 28px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: background 0.15s var(--ease), transform 0.12s var(--ease);
}
.add-pill:hover { background: var(--surface-3); }
.add-pill:active { transform: scale(0.97); }

/* ==========================================================================
   Page projet
   ========================================================================== */

.project {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
  gap: 64px;
  align-items: start;
  padding-top: 20px;
}

.project-art {
  position: sticky;
  top: 110px;
  justify-self: end;
  width: min(100%, 470px);
  aspect-ratio: 1;
}
.cover-btn {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 20px;
}
.project-art .cover {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-card), 0 0 60px var(--glow, transparent);
}
.project-art .cover .cover-glyph svg { width: 64px; height: 64px; }

/* Le disque sort de derrière la pochette quand le projet joue. */
.disc-slot {
  position: absolute;
  inset: 4%;
  z-index: 0;
  transition: transform 0.7s var(--ease);
}
.disc-slot .disc { width: 100%; height: 100%; }
/* Le disque ne dépasse que dans la gouttière : il ne doit jamais passer sous la liste. */
.project-art.is-playing .disc-slot { transform: translateX(13%); }
.project-info { position: relative; z-index: 2; min-width: 0; }

.project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.project-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.project-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 16px;
}
.project-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 600;
}
.project-crumbs button { color: var(--text-muted); }
.project-crumbs button:hover { color: var(--text); }

.project-controls { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.big-play {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 26px var(--accent-glow);
  transition: background 0.15s var(--ease), transform 0.12s var(--ease), box-shadow 0.15s var(--ease);
}
.big-play:hover { background: var(--accent-hover); box-shadow: 0 0 36px var(--accent-glow); }
.big-play:active { transform: scale(0.95); }
.big-play:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.add-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  margin: 26px 0 16px;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 16px;
  font-weight: 700;
  transition: background 0.15s var(--ease);
}
.add-wide:hover { background: var(--surface-3); }

.subfolders { display: grid; gap: 4px; margin-bottom: 10px; }
.subfolder {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 8px 14px 8px 8px;
  border-radius: 14px;
  text-align: left;
  transition: background 0.14s var(--ease);
}
.subfolder:hover { background: rgba(255, 255, 255, 0.05); }
.subfolder .cover { width: 48px; height: 48px; border-radius: 10px; }
.subfolder-name { font-weight: 700; font-size: 15px; }
.subfolder-meta { color: var(--text-muted); font-size: 13px; }
.subfolder .chev { margin-left: auto; color: var(--text-faint); }

/* --- Liste de morceaux ------------------------------------------------------ */

.tracklist { list-style: none; margin: 0; padding: 0; }

.trow {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 12px 12px;
  border-radius: 14px;
  transition: background 0.14s var(--ease);
}
.trow:hover { background: rgba(255, 255, 255, 0.05); }
.trow.with-cover { grid-template-columns: 48px minmax(0, 1fr) auto auto; }

.trow-lead {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.trow.with-cover .trow-lead { width: 48px; height: 48px; }
.trow-lead .cover { width: 48px; height: 48px; border-radius: 10px; }
.trow-lead .lead-play,
.trow-lead .eq { display: none; }
.trow-lead .lead-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.trow.with-cover:hover .lead-overlay,
.trow.with-cover.is-current .lead-overlay { background: rgba(2, 2, 5, 0.58); }

.trow:hover .lead-num { display: none; }
.trow:hover .lead-play { display: block; color: var(--text); }
.trow.is-current .lead-num { display: none; }
.trow.is-current .eq { display: flex; }
.trow.is-current:hover .eq { display: none; }
.trow.is-current .trow-title { color: var(--accent); }

.eq { align-items: flex-end; gap: 2.5px; height: 18px; }
.eq span {
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
  animation: eq 0.9s var(--ease) infinite alternate;
}
.eq span:nth-child(1) { height: 45%; animation-delay: -0.2s; }
.eq span:nth-child(2) { height: 95%; animation-delay: -0.5s; }
.eq span:nth-child(3) { height: 60%; animation-delay: -0.35s; }
.eq span:nth-child(4) { height: 80%; animation-delay: -0.65s; }
.eq.is-paused span { animation-play-state: paused; }
@keyframes eq { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }

.trow-main { min-width: 0; cursor: pointer; }
.trow-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trow-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--text-muted);
  overflow: hidden;
  white-space: nowrap;
}
.trow-sub .note { overflow: hidden; text-overflow: ellipsis; }
.trow-sub .dot { color: var(--text-faint); }

.trow-share { width: 22px; display: grid; place-items: center; color: var(--text-faint); }
.trow-end { display: flex; align-items: center; gap: 4px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.chip-accent { background: var(--accent-soft); color: var(--accent); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-ok { background: rgba(80, 220, 150, 0.12); color: #7ee2ae; }

/* ==========================================================================
   Recherche
   ========================================================================== */

.section-label {
  margin: 30px 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}
.results { max-width: 760px; margin: 0 auto; }
.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 22px;
}
.mini-card { text-align: left; min-width: 0; }
.mini-card .cover { width: 100%; aspect-ratio: 1; border-radius: 14px; box-shadow: var(--shadow-card); }
.mini-card .card-title { margin-top: 10px; font-size: 14.5px; }
.mini-card .card-sub { font-size: 13px; }

/* ==========================================================================
   Profil
   ========================================================================== */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 490px);
  justify-content: center;
  gap: 40px;
  align-items: start;
  padding-top: 40px;
}

.profile-card {
  border: 1px solid var(--border-strong);
  border-radius: 30px;
  background: rgba(10, 10, 14, 0.4);
  padding: 44px 30px 34px;
  text-align: center;
}
.avatar-btn {
  position: relative;
  display: block;
  width: 184px;
  height: 184px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--cover-bg, radial-gradient(circle at 35% 30%, #ff6b7f, var(--accent) 45%, #3d000c));
  box-shadow: 0 0 40px var(--glow, var(--accent-glow));
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 68px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}
.avatar-edit {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 0 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.avatar-btn:hover .avatar-edit,
.avatar-btn:focus-visible .avatar-edit { opacity: 1; }

.profile-name { margin-top: 26px; font-size: 30px; font-weight: 800; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.profile-handle { margin-top: 2px; color: var(--text-muted); font-size: 15px; font-weight: 600; }
.profile-joined { margin-top: 10px; color: var(--text-faint); font-size: 14px; }
.text-btn {
  margin-top: 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-muted);
}
.text-btn:hover { color: var(--text); }

.panels { display: grid; gap: 18px; }
.panel {
  border-radius: 24px;
  background: var(--surface-2);
  overflow: hidden;
}
.panel-pad { padding: 22px 24px; }
.panel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
}
.panel-row + .panel-row { border-top: 1px solid var(--border); }
.panel-row .row-icon { color: var(--text-muted); display: grid; place-items: center; flex-shrink: 0; width: 22px; }
.panel-row .row-body { flex: 1; min-width: 0; }
.panel-row .panel-text { overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.panel-row .btn { flex-shrink: 0; }
.panel-heading { padding: 18px 24px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.panel-danger { background: rgba(255, 30, 61, 0.06); border: 1px solid rgba(255, 30, 61, 0.18); }
.panel-danger .row-icon { color: var(--danger); }
.modal-note { color: var(--text-muted); font-size: 13.5px; margin: 0 0 14px; line-height: 1.5; }
.panel-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.panel-text { color: var(--text-muted); font-size: 14.5px; margin-top: 2px; }
.panel-value { margin-left: auto; color: var(--text-muted); font-size: 17px; font-variant-numeric: tabular-nums; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
}
.stat { padding: 22px 8px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-muted); font-size: 13.5px; margin-top: 2px; }

.meter-label { text-align: center; font-weight: 700; font-size: 16px; }
.meter {
  height: 12px;
  margin-top: 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  min-width: 12px;
  border-radius: inherit;
  background: #f4f4f7;
}
.meter.is-full span { background: var(--accent); }
.meter-hint { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-top: 12px; }

/* ==========================================================================
   Lecteur flottant
   ========================================================================== */

.pill-player {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 32px));
  height: 80px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px 0 10px;
  border-radius: var(--r-pill);
  background: rgba(26, 26, 33, 0.9);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
  animation: rise 0.3s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

.pp-now {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 210px;
  flex-shrink: 0;
  text-align: left;
  border-radius: var(--r-pill);
}
.pp-disc { width: 60px; height: 60px; }
.pp-meta { display: grid; min-width: 0; }
.pp-title, .pp-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-title { font-weight: 600; font-size: 15px; }
.pp-sub { color: var(--text-muted); font-size: 13.5px; }

.pp-wave {
  flex: 1;
  min-width: 100px;
  height: 46px;
  cursor: pointer;
  touch-action: none;
  border-radius: 6px;
}

.pp-time {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pp-controls, .pp-extras { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pp-extras { gap: 2px; }

.pp-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  transition: color 0.15s var(--ease), background 0.15s var(--ease), transform 0.12s var(--ease);
}
.pp-btn:hover { background: rgba(255, 255, 255, 0.08); }
.pp-btn:active { transform: scale(0.92); }
.pp-btn:disabled { opacity: 0.3; cursor: default; background: none; }
.pp-extras .pp-btn { color: var(--text-muted); }
.pp-extras .pp-btn:hover { color: var(--text); }
.pp-btn.is-active { color: var(--accent) !important; }
.pp-btn.is-active::after {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.pp-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.pp-play {
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}
.pp-play:hover { background: var(--accent-hover); }

/* Popover de volume */
.volume-pop { padding: 14px 16px; min-width: 220px; }
.volume-pop .range-row { display: flex; align-items: center; gap: 10px; }
.volume-pop .range-value { font-family: var(--mono); font-size: 12px; color: var(--text-muted); min-width: 34px; text-align: right; }

input[type="range"].range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  background: transparent;
  cursor: pointer;
}
input[type="range"].range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), rgba(255, 255, 255, 0.16) var(--pct, 0%));
}
input[type="range"].range::-moz-range-track {
  height: 4px;
  border-radius: var(--r-pill);
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), rgba(255, 255, 255, 0.16) var(--pct, 0%));
}
input[type="range"].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px var(--accent-glow);
}
input[type="range"].range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: #fff;
}

/* File d'attente */
.queue-panel {
  position: fixed;
  z-index: 49;
  right: max(16px, calc((100vw - 1120px) / 2));
  bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 32px));
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding: 16px 10px 10px;
  border-radius: 24px;
  background: rgba(22, 22, 29, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
  animation: pop 0.18s var(--ease);
}
.queue-panel h3 { font-size: 16px; padding: 0 10px 6px; }
.queue-panel .section-label { margin: 14px 10px 6px; font-size: 11px; }
.qrow {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 12px;
  text-align: left;
}
.qrow:hover { background: rgba(255, 255, 255, 0.06); }
.qrow .cover { width: 40px; height: 40px; border-radius: 8px; }
.qrow-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow-sub { color: var(--text-muted); font-size: 12.5px; }
.qrow.is-current .qrow-title { color: var(--accent); }
.qrow > span:last-child { min-width: 0; }

/* Envois en cours */
.upload-tray {
  position: fixed;
  z-index: 60;
  left: 18px;
  bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  width: min(320px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(22, 22, 29, 0.96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-pop);
}
.upload-item { display: grid; gap: 6px; }
.upload-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.upload-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-state { color: var(--text-muted); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.upload-bar { height: 4px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.upload-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s linear; }
.upload-item.is-error .upload-state { color: var(--danger); }
.upload-item.is-done .upload-bar span { background: #f4f4f7; }

/* ==========================================================================
   Menus, modales, champs
   ========================================================================== */

.popover {
  position: fixed;
  /* Au-dessus des fenêtres (80) : un menu ouvert depuis une fenêtre doit rester visible. */
  z-index: 100;
  min-width: 210px;
  padding: 6px;
  background: rgba(26, 26, 33, 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  animation: pop 0.14s var(--ease);
}
.popover > button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.popover > button:hover { background: rgba(255, 255, 255, 0.08); }
.popover > button.is-danger { color: var(--danger); }
.popover > button.is-danger:hover { background: var(--danger-soft); }
.popover .sep { height: 1px; margin: 5px 8px; background: var(--border); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(1, 1, 3, 0.7);
  backdrop-filter: blur(4px);
  animation: fade 0.16s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 460px;
  max-height: 84vh;
  overflow-y: auto;
  background: rgba(22, 22, 29, 0.98);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-pop);
  padding: 24px;
  animation: pop 0.18s var(--ease);
}
.modal.modal-wide { max-width: 580px; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal h2 { font-size: 19px; letter-spacing: -0.03em; margin-bottom: 4px; }
.modal .modal-sub {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0 0 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 6px; }
.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: rgba(3, 3, 6, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
textarea.input { height: auto; padding: 10px 14px; resize: vertical; min-height: 70px; }
select.input { appearance: none; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--text-faint); }

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.item-card {
  background: rgba(3, 3, 6, 0.45);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-title { font-weight: 700; font-size: 14.5px; }
.item-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; word-break: break-word; }
.item-note { font-size: 13px; color: var(--text-muted); margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--accent-soft); }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.link-box {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 10px;
  word-break: break-all;
}
.modal-loading { color: var(--text-muted); padding: 10px 0; }

.cover-editor { display: flex; align-items: center; gap: 18px; }
.cover-editor .cover { width: 136px; height: 136px; border-radius: 16px; box-shadow: var(--shadow-card); }
.cover-editor .cover-glyph svg { width: 44px; height: 44px; }

/* --- Galerie de pochettes --------------------------------------------------- */

.gallery-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 0 10px; font-weight: 700; }
.gallery-count { color: var(--text-faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; margin-bottom: 12px; }
.gallery-thumb, .gallery-add {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.2s var(--ease); }
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-thumb.is-main { box-shadow: 0 0 0 2px var(--accent); }
.gallery-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.gallery-add {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border: 1.5px dashed var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}
.gallery-add:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }

/* Sous la pochette du projet et des liens partagés. */
.project-art .gallery-nav {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -46px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gallery-arrow {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
}
.gallery-arrow svg { width: 16px; height: 16px; }
.gallery-arrow:hover { color: var(--text); background: var(--surface-3); }
.gallery-dots { display: flex; gap: 6px; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); transition: background 0.15s var(--ease), transform 0.15s var(--ease); }
.gallery-dots span.is-active { background: var(--text); transform: scale(1.25); }

/* --- Recadrage -------------------------------------------------------------- */

.crop-stage {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
  touch-action: none;
  cursor: grab;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  height: auto;
  transform-origin: 0 0;
  user-select: none;
  pointer-events: none;
}
.crop-frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 33.33% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 66.66% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 0 33.33% / 100% 1px no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) 0 66.66% / 100% 1px no-repeat;
}
/* Photo de profil : tout ce qui sort du cercle est assombri. */
.crop-stage.is-round .crop-frame { background: radial-gradient(circle closest-side, transparent 99%, rgba(0, 0, 0, 0.62) 100%); }
.crop-zoom { display: flex; align-items: center; gap: 12px; max-width: 360px; margin: 16px auto 0; color: var(--text-muted); }
.crop-zoom input { flex: 1; accent-color: var(--accent); }
.cover-editor-side { flex: 1; min-width: 0; display: grid; gap: 8px; align-content: start; }
.cover-hint { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ==========================================================================
   États vides, toasts, dépôt
   ========================================================================== */

.empty {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  padding: 70px 20px 20px;
  color: var(--text-muted);
}
.empty .empty-disc { width: 120px; height: 120px; margin-bottom: 14px; --glow: var(--accent-glow); }
.empty h3 { font-size: 20px; color: var(--text); }
.empty p { margin: 0; font-size: 15px; max-width: 380px; }
.empty-inline { color: var(--text-muted); padding: 18px 12px; font-size: 15px; }

.toast-root {
  position: fixed;
  z-index: 90;
  top: calc(24px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(240, 240, 245, 0.97);
  color: #0a0a0d;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.2s var(--ease);
}
.toast.is-error { background: var(--accent); color: #fff; box-shadow: 0 0 26px var(--accent-glow); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.dropzone {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: grid;
  place-items: center;
  background: rgba(3, 3, 6, 0.88);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.dropzone-inner {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 44px 60px;
  border: 2px dashed var(--accent);
  border-radius: var(--r-xl);
  font-weight: 700;
  font-size: 16px;
  background: var(--accent-soft);
  box-shadow: 0 0 60px var(--accent-glow);
}

/* Accueil : voile léger et consigne en bas, pour viser une carte de projet. */
.dropzone.is-light { background: rgba(3, 3, 6, 0.35); backdrop-filter: none; place-items: end center; padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.dropzone.is-light .dropzone-inner { padding: 16px 28px; grid-auto-flow: column; background: rgba(20, 4, 9, 0.92); }
.dropzone.is-light .dropzone-inner svg { width: 22px; height: 22px; }

/* ==========================================================================
   Paroles
   Plein écran sous le lecteur : la lueur vient de la pochette du morceau, la
   ligne chantée est la seule en pleine lumière.
   ========================================================================== */

body.has-lyrics { overflow: hidden; }
.pp-lyrics { color: var(--text-muted); flex-shrink: 0; }
.pp-lyrics:hover { color: var(--text); }
body.has-lyrics .pp-lyrics { color: var(--accent); }

.lyrics {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(90% 70% at 20% 0%, var(--glow, var(--accent-soft)), transparent 70%),
    radial-gradient(70% 60% at 100% 100%, rgba(255, 30, 61, 0.08), transparent 70%),
    rgba(5, 5, 8, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: lyrics-in 0.28s var(--ease);
}
@keyframes lyrics-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.lyrics-loading { margin: auto; color: var(--text-muted); }

.lyrics-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 40px 14px;
}
.lyrics-title { flex: 1; min-width: 0; display: grid; }
.lyrics-title strong { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyrics-title span { color: var(--text-muted); font-size: 13.5px; }
.lyrics-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8vh 40px calc(170px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 82%, transparent);
}
.lyrics-scroll::-webkit-scrollbar { display: none; }
.lyrics-lines { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 860px; }
.lyric-line {
  padding: 6px 0;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.22;
  text-wrap: balance;
  color: var(--text);
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.lyrics-lines.is-synced .lyric-line { color: rgba(255, 255, 255, 0.34); }
.lyrics-lines.is-synced .lyric-line.is-past { color: rgba(255, 255, 255, 0.55); }
.lyrics-lines.is-synced .lyric-line.is-active { color: #fff; text-shadow: 0 0 28px rgba(255, 255, 255, 0.25); }
.lyric-line[role="button"] { cursor: pointer; }
.lyric-line[role="button"]:hover { color: rgba(255, 255, 255, 0.8); }
.lyric-gap { height: 30px; }
.lyrics-hint { max-width: 860px; margin: 30px auto 0; color: var(--text-muted); font-size: 14px; }

.lyrics-empty {
  margin: auto;
  padding: 0 24px 140px;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 440px;
  text-align: center;
  color: var(--text-muted);
}
.lyrics-empty-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--surface-2); color: var(--text); }
.lyrics-empty-icon svg { width: 30px; height: 30px; }
.lyrics-empty h3 { color: var(--text); font-size: 22px; }
.lyrics-empty p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }

/* Éditeur */
.lyrics-editor {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 6px 40px calc(130px + env(safe-area-inset-bottom, 0px));
}
.lyrics-textarea {
  flex: 1;
  min-height: 200px;
  width: 100%;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(3, 3, 6, 0.6);
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
  resize: none;
}
.lyrics-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lyrics-textarea::placeholder { color: var(--text-faint); font-weight: 500; }
.lyrics-note { margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.lyrics-editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* Synchronisation */
.sync {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 40px;
}
.sync-help { color: var(--text-muted); font-size: 13.5px; line-height: 1.6; padding-bottom: 10px; }
kbd {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface-2);
  color: var(--text);
  font: 600 12px/1.5 var(--mono);
  text-align: center;
}
.sync-lines { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 30px 0 40px; }
.sync-line {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text-muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.sync-line.is-set { color: var(--text); }
.sync-line.is-next { background: var(--accent-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.sync-text { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.sync-time { display: flex; align-items: center; gap: 2px; }
.sync-stamp {
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 8px;
  font: 600 13px var(--mono);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.sync-stamp:not(:disabled):hover { background: rgba(255, 255, 255, 0.08); }
.sync-stamp:disabled { color: var(--text-faint); cursor: default; }
.sync-nudge { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--text-faint); }
.sync-nudge:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.sync-here { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--text-faint); opacity: 0; }
.sync-line:hover .sync-here { opacity: 1; }
.sync-here:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.sync-gap { height: 14px; }

.sync-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 calc(128px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}
.sync-play {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--text);
  color: #0b0b0f;
}
.sync-tap {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 12px 20px;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  text-align: left;
  box-shadow: 0 0 26px var(--accent-glow);
  transition: transform 0.08s var(--ease), background 0.15s var(--ease);
  touch-action: manipulation;
}
.sync-tap:active { transform: scale(0.97); background: var(--accent-hover); }
.sync-tap:disabled { background: var(--surface-3); box-shadow: none; }
.sync-tap-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.sync-tap-line { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-small { width: 40px; height: 40px; flex-shrink: 0; }
.sync-back { width: auto; padding: 0 10px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chip-button { cursor: pointer; border: none; font: inherit; font-size: 11px; font-weight: 700; }
.chip-button:hover { background: rgba(255, 255, 255, 0.16); color: var(--text); }

/* ==========================================================================
   Collaborateurs
   ========================================================================== */

.invites { display: grid; gap: 10px; margin-bottom: 26px; }
.invite {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 0% 0%, var(--glow, var(--accent-soft)), transparent 60%),
    var(--surface-2);
  border: 1px solid var(--border-strong);
}
.invite-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.invite-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.invite-text strong { font-size: 15.5px; overflow-wrap: anywhere; }
.invite-text span { color: var(--text-muted); font-size: 13.5px; }
.invite-actions { display: flex; gap: 8px; flex-shrink: 0; }

.members-btn { position: relative; overflow: visible; }
.members-btn > svg { flex-shrink: 0; }
.members-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.member-invite { display: flex; gap: 8px; margin-bottom: 14px; }
.member-invite .input { flex: 1; min-width: 0; }
.member-invite .btn { height: 44px; }
.members { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.member-main { flex: 1; min-width: 0; display: grid; }
.member-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-me { color: var(--text-faint); font-weight: 500; }
.member-sub { color: var(--text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-leave { margin-right: auto; color: var(--danger); border-color: rgba(255, 90, 110, 0.35); }

.leave-choices { display: grid; gap: 10px; }
.leave-choice {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: rgba(3, 3, 6, 0.45);
  text-align: left;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.leave-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
.leave-choice strong { font-size: 15px; }
.leave-choice span { color: var(--text-muted); font-size: 13px; }

/* --- BPM et tonalité ------------------------------------------------------------- */

.chip-music { background: rgba(255, 255, 255, 0.06); color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.music-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ==========================================================================
   Notifications, exclus, commentaires
   ========================================================================== */

.text-link { color: var(--text-muted); font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--text); }
.label-soft { font-weight: 500; color: var(--text-faint); }

.bell-btn { position: relative; overflow: visible; }
.bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 0 12px var(--accent-glow);
}

.popover:has(.notif-pop) { padding: 0; width: min(380px, calc(100vw - 24px)); }
.notif-pop { max-height: min(520px, 70vh); overflow-y: auto; }
.notif-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px 10px; background: rgba(26, 26, 33, 0.98); }
.notif-list { list-style: none; margin: 0; padding: 0 6px 8px; }
.notif { display: flex; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; }
.notif:hover { background: rgba(255, 255, 255, 0.05); }
.notif.is-unread { background: var(--accent-soft); }
.notif.is-unread:hover { background: rgba(255, 30, 61, 0.2); }
.notif-main { display: grid; gap: 3px; min-width: 0; }
.notif-text { font-size: 13.5px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.notif-text strong { color: var(--text); }
.notif-excerpt { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-faint); }
.notif-time svg { width: 13px; height: 13px; color: var(--accent); }
.notif-empty { padding: 4px 16px 18px; margin: 0; color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }

.exclus-strip { margin-bottom: 30px; }
.exclus-strip-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.exclus-strip-head h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.exclus-strip-head h2 svg, .exclu-eyebrow svg { color: var(--accent); }
.exclus-row { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 18px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.exclus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px; margin-top: 10px; }
.exclu-card { display: grid; gap: 4px; min-width: 0; text-align: left; }
.exclu-art { position: relative; display: block; aspect-ratio: 1; }
.exclu-art .cover { width: 100%; height: 100%; border-radius: 16px; box-shadow: var(--shadow-card), 0 0 34px var(--glow, transparent); transition: transform 0.2s var(--ease); }
.exclu-card:hover .cover { transform: translateY(-3px); }
.exclu-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 14px var(--accent-glow);
}
.exclu-badge svg { width: 12px; height: 12px; }
.exclu-name { margin-top: 6px; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exclu-sub { display: flex; align-items: center; gap: 3px; color: var(--text-muted); font-size: 12.5px; overflow: hidden; white-space: nowrap; }
.exclu-sub svg { width: 12px; height: 12px; }
.exclus-page { max-width: 980px; margin: 0 auto; padding-top: 18px; }
.my-exclus { list-style: none; margin: 0; padding: 0; }
.my-exclu { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 10px; border-radius: 12px; text-align: left; flex-wrap: wrap; }
.my-exclu:hover { background: rgba(255, 255, 255, 0.05); }
.my-exclu-name { font-weight: 700; }
.my-exclu-sub { margin-left: auto; color: var(--text-faint); font-size: 12.5px; }
.exclu-eyebrow { display: flex; align-items: center; gap: 6px; color: var(--accent) !important; }
.exclu-message { margin: 16px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--surface-2); color: var(--text); font-size: 15px; line-height: 1.5; white-space: pre-line; }
.exclu-stop { margin-top: 14px; }
.chip svg { width: 11px; height: 11px; margin-right: 3px; }

.comments { margin-top: 34px; }
.comments-title { font-size: 19px; margin-bottom: 12px; }
.comments-title span { color: var(--text-faint); font-weight: 600; }
.comment-form { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.comment-form textarea.input { min-height: 76px; }
.comment-form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.comment-at { margin-right: auto; font-size: 13px; color: var(--text-muted); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.comment-list { list-style: none; margin: 14px 0 0; padding: 0; }
.comment { display: flex; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13.5px; }
.comment-on, .comment-date { color: var(--text-faint); font-size: 12.5px; }
.comment-date { margin-left: auto; }
.comment-del { width: 28px; height: 28px; }
.comment-body { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.comment-at-chip {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font: 700 12px var(--mono);
  vertical-align: 1px;
}
.comment-at-chip:hover { background: var(--accent); color: #fff; }
.comment-empty { padding: 14px 2px; color: var(--text-muted); font-size: 14px; }
.share-comments { max-width: 760px; }

/* --- Partage ------------------------------------------------------------------ */

.share-sheet { display: grid; gap: 14px; }
.share-thumb { display: none; }
.share-state {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 62px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(3, 3, 6, 0.45);
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  transition: border-color 0.15s var(--ease);
}
.share-state:hover { border-color: rgba(255, 255, 255, 0.3); }
.share-state-icon { display: grid; place-items: center; color: var(--text-muted); }
.share-state.is-on { border-color: rgba(255, 30, 61, 0.5); box-shadow: 0 0 0 3px var(--accent-soft); }
.share-state.is-on .share-state-icon { color: var(--accent); }
.share-state-label { flex: 1; min-width: 0; }
.share-state-chev { color: var(--text-faint); display: grid; }

.share-link { display: grid; gap: 10px; }
.share-link .link-box { margin: 0; }
.share-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.share-heading { margin: 6px 0 -4px; font-size: 15px; font-weight: 700; }
.share-group { border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: default;
}
label.share-row { cursor: pointer; }
.share-row + .share-row { border-top: 1px solid var(--border); }
.share-row > span:first-child { min-width: 0; display: grid; gap: 2px; }
.share-row-title { font-weight: 700; font-size: 15px; }
.share-row-text { color: var(--text-muted); font-size: 13px; }
.share-row-value { color: var(--text-muted); font-size: 14.5px; text-align: right; font-variant-numeric: tabular-nums; }
.share-select { width: auto; height: 36px; flex-shrink: 0; padding: 0 12px; }

/* --- Glisser pour ranger ---------------------------------------------------- */

.trow, .card { -webkit-touch-callout: none; }
.card img, .trow img { -webkit-user-drag: none; }
body.is-dragging-item, body.is-dragging-item * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

.drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 120;
  max-width: 260px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 22px var(--accent-glow);
  pointer-events: none;
}

.trow.is-dragging { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); opacity: 0.85; }
.card.is-dragging { opacity: 0.4; }

.is-drop-target { position: relative; z-index: 86; }
.card.is-drop-target .card-art .cover,
.subfolder.is-drop-target {
  box-shadow: 0 0 0 3px var(--accent), 0 0 30px var(--accent-glow);
}
.card.is-drop-target .card-art { transform: scale(1.04); transition: transform 0.15s var(--ease); }
.subfolder.is-drop-target { background: var(--accent-soft); }

/* ==========================================================================
   Connexion
   ========================================================================== */

.auth-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 26px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}
.auth-card .brand { display: flex; justify-content: center; font-size: 28px; margin-bottom: 6px; }
.auth-card .brand-mark { width: 32px; height: 32px; }
.auth-tagline { color: var(--text-muted); font-size: 13.5px; margin: 0 0 24px; text-align: center; }
.auth-title { font-size: 22px; letter-spacing: -0.035em; margin: 0 0 18px; }
.auth-lead { color: var(--text-muted); font-size: 14px; margin: -8px 0 18px; line-height: 1.5; }
.auth-lead strong { color: var(--text); font-weight: 600; }

.auth-form { display: grid; gap: 2px; }
.auth-form .field { margin-bottom: 12px; }
.auth-form .btn-block { height: 48px; margin-top: 8px; font-size: 15px; }

.field-error { color: var(--accent); font-size: 12.5px; font-weight: 600; margin: -6px 0 12px; }
.field-hint { color: var(--text-faint); font-size: 12.5px; margin: -6px 0 12px; }
.field-hint a, .check a, .auth-switch a, .auth-aside a { color: var(--text); font-weight: 600; }
.field-hint a:hover, .check a:hover, .auth-switch a:hover, .auth-aside a:hover { color: var(--accent); }

.password-wrap { position: relative; }
.password-wrap .input { padding-right: 88px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.password-toggle:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-muted); margin: 4px 0 12px; cursor: pointer; }
.check input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }

.auth-aside { text-align: right; font-size: 13px; margin: -4px 0 6px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-muted); margin: 20px 0 0; }

.auth-notice { font-size: 13.5px; font-weight: 500; line-height: 1.5; border-radius: 12px; padding: 11px 14px; margin: 0 0 16px; }
.auth-notice-error { background: var(--accent-soft); color: #ff8a9b; }
.auth-notice-ok { background: rgba(80, 220, 150, 0.1); color: #7ee2ae; }

.provider-list { display: grid; gap: 10px; }
.btn-provider { height: 48px; gap: 10px; font-size: 14.5px; border-radius: 14px; }
.btn-provider-google { background: #fff; color: #1f1f1f; }
.btn-provider-google:hover { background: #ececef; }
.btn-provider-apple { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); }
.btn-provider-apple:hover { background: #111; border-color: rgba(255, 255, 255, 0.5); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

.auth-legal { margin-top: 22px; font-size: 12.5px; }
.auth-legal a { color: var(--text-faint); }
.auth-legal a:hover { color: var(--text); }

/* Page de confidentialité */
.legal-body { justify-content: flex-start; }
.legal {
  width: 100%;
  max-width: 680px;
  padding: 32px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  line-height: 1.65;
  font-size: 15px;
}
.legal .brand { font-size: 22px; margin-bottom: 24px; }
.legal h1 { font-size: 28px; margin-bottom: 4px; }
.legal h2 { font-size: 17px; margin: 28px 0 8px; }
.legal p, .legal li { color: #c9c9d2; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
.legal-meta { color: var(--text-faint) !important; margin: 0; font-size: 13px; }
.legal-back { margin-top: 28px; }
.legal-back a { font-weight: 700; }

/* Page de vérification de l'installation */
.check-summary { font-weight: 700; border-radius: 14px; padding: 14px 16px; margin: 18px 0 8px; }
.check-summary.is-ok { background: rgba(80, 220, 150, 0.12); color: #7ee2ae; }
.check-summary.is-ko { background: var(--accent-soft); color: #ff8a9b; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.check-item p { margin: 4px 0 0; font-size: 13.5px; }
.check-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.check-item.is-ok .check-mark { background: rgba(80, 220, 150, 0.16); color: #7ee2ae; }
.check-item.is-ko .check-mark { background: var(--accent); color: #fff; }
.check-item.is-ko { background: var(--accent-soft); }
.check-item.is-info .check-mark { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); font-style: italic; }
.check-mail { max-width: 420px; }
.check-mail .btn { justify-self: start; }

/* Bandeau « confirme ton email » */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto 26px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 30, 61, 0.28);
}
.verify-icon { color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.verify-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13.5px; }
.verify-text span { color: var(--text-muted); overflow-wrap: anywhere; }
.panels .verify-banner { margin: 0; }

/* ==========================================================================
   Pages de partage publiques
   ========================================================================== */

.share-body { min-height: 100vh; min-height: 100dvh; }
.share-single { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 24px 140px; }

.share-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
}
.share-card .disc { width: 220px; height: 220px; margin: 0 auto 26px; }
.share-eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--text-faint);
}
.share-card h1 { font-size: 30px; margin: 6px 0 4px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.share-card .project-meta { margin-bottom: 22px; }

.share-appbar { justify-content: space-between; }
.share-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}
.share-brand .brand-mark { width: 18px; height: 18px; box-shadow: none; }

/* ==========================================================================
   Administration
   Même grammaire que le profil : panneaux, lignes, jauges. Le rouge reste
   réservé aux actions (inviter, enregistrer) et aux jauges pleines.
   ========================================================================== */

.admin { max-width: 860px; margin: 0 auto; padding-top: 18px; display: grid; gap: 18px; }
.admin-head h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.045em; }
.admin-head p { margin: 4px 0 6px; color: var(--text-muted); font-size: 15px; }

.admin-stats { grid-template-columns: repeat(4, 1fr); }
.admin-stats .stat-value { font-size: 26px; white-space: nowrap; }
.stat-note { color: var(--text-faint); font-size: 12px; margin-top: 6px; padding: 0 6px; }

.panel-link { display: block; width: 100%; text-align: left; transition: background 0.15s var(--ease); }
.panel-link:hover { background: var(--surface-3); }

.chip-warn { background: rgba(255, 190, 90, 0.13); color: #ffc877; }
.label-soft { font-weight: 500; color: var(--text-faint); }

/* Interrupteur */
.switch { position: relative; flex-shrink: 0; width: 50px; height: 30px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  pointer-events: none;
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s var(--ease);
}
.switch input:checked + span { background: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Liste des comptes */
.admin-tools { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 24px 14px; }
.admin-search { flex: 1 1 260px; max-width: none; margin: 0; height: 44px; background: rgba(3, 3, 6, 0.6); border-color: var(--border-strong); }
.admin-selects { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-select {
  width: auto;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9aa8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  cursor: pointer;
}
.admin-select option { background: #15151b; }

.admin-users { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.admin-users li + li { border-top: 1px solid var(--border); }
.admin-user {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 24px;
  text-align: left;
  transition: background 0.15s var(--ease);
}
.admin-user:hover { background: rgba(255, 255, 255, 0.04); }
.admin-user.is-suspended .admin-avatar,
.admin-user.is-suspended .admin-user-name { opacity: 0.5; }

.admin-avatar {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 18px var(--glow, transparent);
}
.admin-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.admin-user-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.admin-user-name { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-handle { color: var(--text-muted); font-weight: 500; }
.admin-user-sub { color: var(--text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.admin-user-chips:not(:empty) { margin-top: 5px; }

.admin-user-usage { flex-shrink: 0; width: 150px; display: grid; gap: 6px; text-align: right; }
.admin-usage-text { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-usage-text span { color: var(--text-faint); font-weight: 500; }
.admin-usage-sub { color: var(--text-faint); font-size: 12px; }
.mini-meter { height: 5px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.mini-meter span { display: block; height: 100%; border-radius: inherit; background: #f4f4f7; }
.mini-meter.is-full span { background: var(--accent); }

.admin-list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}
.admin-empty { padding: 20px 24px 26px; border-top: 1px solid var(--border); }

/* Fiche d'un compte */
.admin-modal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.admin-modal-head .admin-user-chips { margin: 0; }

.admin-details { margin: 0 0 18px; display: grid; gap: 0; border-top: 1px solid var(--border); }
.admin-detail { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.admin-detail dt { width: 118px; flex-shrink: 0; color: var(--text-faint); }
.admin-detail dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.admin-quota { padding: 16px 18px; border-radius: 16px; background: rgba(3, 3, 6, 0.45); border: 1px solid var(--border); }
.admin-quota-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 14px; }
.admin-quota-kind { color: var(--text-faint); font-size: 12.5px; }
.admin-quota .meter { margin-top: 10px; height: 8px; }
.admin-quota-form { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.admin-quota-form label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-right: auto; }
.admin-quota-input { position: relative; width: 116px; }
.admin-quota-input .input { height: 34px; padding-right: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.admin-quota-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; pointer-events: none; }

.admin-actions { display: grid; gap: 2px; margin-top: 16px; }
.admin-action {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  text-align: left;
  color: var(--text-muted);
  transition: background 0.15s var(--ease);
}
.admin-action:hover { background: rgba(255, 255, 255, 0.06); }
.admin-action:disabled { opacity: 0.5; cursor: default; }
.admin-action > span { display: grid; gap: 1px; }
.admin-action strong { color: var(--text); font-size: 14.5px; font-weight: 700; }
.admin-action em { font-style: normal; font-size: 12.5px; color: var(--text-faint); }
.admin-action.is-danger, .admin-action.is-danger strong { color: var(--danger); }
.admin-action.is-danger:hover { background: var(--danger-soft); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1000px) {
  .pp-extras #pp-queue, .pp-extras #pp-repeat { display: none; }
  .pp-now { width: 170px; }
}

@media (max-width: 860px) {
  .appbar { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px; }
  .view { padding: 4px 16px 170px; }
  .brand { font-size: 22px; }
  .round-btn { width: 42px; height: 42px; border-radius: 13px; }

  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .card-art { width: 100%; height: auto; aspect-ratio: 1; }
  /* Le bouton se range dans la pochette : au doigt, rien ne touche le bord de l'écran. */
  .card-play { width: 44px; height: 44px; border-radius: 13px; right: 8px; bottom: 8px; }
  .card-title { margin-top: 12px; font-size: 15px; }
  .card-sub { font-size: 13px; }
  .exclus-row { grid-auto-columns: 136px; gap: 14px; }
  /* Le lecteur flotte au-dessus du contenu : on lui laisse la place en bas. */
  body:has(.pill-player:not([hidden])) .view { padding-bottom: calc(210px + env(safe-area-inset-bottom, 0px)); }
  /* Page projet : le partage reste dans le menu « … », la barre respire. */
  #btn-project-share { display: none; }

  .project { grid-template-columns: 1fr; gap: 26px; padding-top: 0; }
  .project-art { position: relative; top: 0; justify-self: center; width: min(78vw, 320px); }
  .project-art.is-playing .disc-slot { transform: translateX(11%); }
  .project-title { font-size: 26px; }
  .project-meta { font-size: 14.5px; }
  .big-play { width: 54px; height: 54px; border-radius: 16px; }
  .trow { padding: 10px 4px 10px 6px; gap: 10px; }
  .trow-share { display: none; }

  .profile { grid-template-columns: 1fr; padding-top: 10px; gap: 24px; }

  .admin { padding-top: 4px; }
  .admin-head h1 { font-size: 28px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stats .stat:nth-child(3) { border-left: none; }
  .admin-stats .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .admin-stats .stat-value { font-size: 22px; }
  .panel-row { flex-wrap: wrap; padding: 16px 18px; }
  .panel-heading, .admin-tools, .admin-list-foot { padding-left: 18px; padding-right: 18px; }
  .admin-user { padding: 12px 18px; flex-wrap: wrap; }
  .admin-user-usage { width: 100%; padding-left: 54px; text-align: left; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; }
  .admin-usage-sub { grid-column: 1 / -1; }
  .admin-selects, .admin-select { flex: 1; }
  .admin-row-stack .row-body { flex-basis: calc(100% - 40px); }
  .admin-row-stack .panel-value { margin-left: 36px; margin-right: auto; }
  .avatar-btn { width: 140px; height: 140px; }
  .avatar-edit { opacity: 1; }

  .pill-player {
    height: auto;
    border-radius: 24px;
    padding: 10px 12px 8px;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .pp-now { flex: 1; width: auto; }
  .pp-disc { width: 46px; height: 46px; }
  .pp-wave { order: 5; flex-basis: 100%; height: 34px; }
  .pp-time, .pp-extras, #pp-prev { display: none; }
  .pp-play { width: 44px; height: 44px; }

  .queue-panel { right: 16px; bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
  .upload-tray { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }

  .cover-editor { flex-direction: column; align-items: stretch; }
  .cover-editor .cover { width: 100%; height: auto; aspect-ratio: 1; }
  .project-art .gallery-nav { bottom: -42px; }
  .project-art.has-gallery { margin-bottom: 44px; }

  .lyrics-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px; flex-wrap: wrap; }
  .lyrics-actions { width: 100%; justify-content: flex-start; order: 3; }
  .lyrics-scroll { padding-left: 20px; padding-right: 20px; padding-bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
  .lyrics-editor, .sync { padding-left: 16px; padding-right: 16px; }
  .lyrics-editor { padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
  .lyrics-textarea { font-size: 16px; padding: 16px; }
  .sync-help { display: none; }
  .sync-line { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .sync-time { order: 2; }
  .sync-text { grid-column: 1 / -1; font-size: 16px; }
  .sync-here { display: none; }
  .sync-bar { flex-wrap: wrap; padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)); }
  .sync-tap { order: -1; flex-basis: 100%; padding: 16px 20px; }
  .sync-reset { margin-left: auto; }

  .invite { flex-wrap: wrap; }
  .invite-actions { width: 100%; justify-content: flex-end; }

}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body::after { opacity: 0.8; }
}

/* Bibliothèque : sons des autres gardés ou reçus */
.card-sub .saved-mark { display: inline-grid; color: var(--text-faint); }
.card-sub .saved-mark svg { width: 13px; height: 13px; }
.card-saved.is-unavailable .card-art { opacity: 0.4; filter: grayscale(0.7); }
.card-saved.is-unavailable .card-title { color: var(--text-muted); }
.saved-eyebrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; text-transform: none; letter-spacing: 0.02em; }
.saved-eyebrow svg { width: 14px; height: 14px; }
.saved-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.saved-actions:empty { display: none; }
.saved-actions .exclu-stop { margin-top: 0; }
.comments-note { margin: -4px 0 12px; color: var(--text-faint); font-size: 13px; }

/* Fenêtre de partage : envoi à un membre */
.share-send { padding: 14px; }
.send-form { display: grid; gap: 10px; }
.send-row { display: flex; gap: 8px; }
.send-row .input { flex: 1; min-width: 0; }
.send-row .btn { height: 44px; flex-shrink: 0; }
.send-row .btn svg { width: 15px; height: 15px; }
.send-check { margin: 0; }
.send-form .share-row-text { margin: 0; }
.send-list { margin-top: 12px; }
.send-list .member:last-child { border-bottom: none; }
.send-dl { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-muted); cursor: pointer; }
.send-dl input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.send-dl svg { width: 14px; height: 14px; }

/* Page d'un lien partagé : garder le son */
.keep-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 18px; }
.keep-row form { margin: 0; }
.keep-row .btn svg { flex-shrink: 0; }
.keep-hint { color: var(--text-faint); font-size: 13px; max-width: 46ch; }
.keep-error { width: 100%; margin: 0; color: var(--danger, #ff5a6e); font-size: 13px; }
.comment-as { margin: 0; color: var(--text-muted); font-size: 13.5px; }
.comment-as strong { color: var(--text); }

/* ==========================================================================
   Administration : onglets, statistiques, référencement
   ========================================================================== */

.admin-wide { max-width: 1120px; }
.admin-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); justify-self: start; }
.admin-tab { padding: 8px 16px; border-radius: var(--r-pill); color: var(--text-muted); font-weight: 700; font-size: 14px; transition: background 0.15s var(--ease), color 0.15s var(--ease); }
.admin-tab:hover { color: var(--text); }
.admin-tab.is-active { background: var(--surface-3); color: var(--text); }

.stats-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 8px #2fbf71; vertical-align: 1px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.segmented button { padding: 7px 12px; border-radius: 9px; color: var(--text-muted); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: var(--surface-3); color: var(--text); }
.stats-off { margin: 0; padding: 12px 16px; border-radius: 14px; background: rgba(224, 180, 58, 0.12); color: #e8c25a; font-weight: 600; }

.stats-5 { grid-template-columns: repeat(5, 1fr); }
.stat-delta { font-variant-numeric: tabular-nums; }
.stat-delta span { color: var(--text-faint); }
.stat-delta.is-up { color: #4fd88c; }
.stat-delta.is-down { color: var(--danger); }

.chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.chart-legend { display: inline-flex; align-items: center; gap: 6px 8px; color: var(--text-muted); font-size: 13px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--text); }
.chart-legend .lg-bar { width: 8px; height: 12px; margin-left: 10px; background: var(--accent); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-tick { fill: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-area { fill: rgba(244, 244, 247, 0.07); }
.chart-line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-bar { fill: var(--accent); }
.chart-dot { fill: var(--text); stroke: var(--sky); stroke-width: 2; }
.chart-hit { fill: transparent; }
.chart-hit:hover { fill: rgba(244, 244, 247, 0.12); }

.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.panel-sub { margin: 18px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); }
.panel-hint { margin: 12px 0 0; color: var(--text-faint); font-size: 12.5px; }
.panel-pad > .panel-title + * { margin-top: 12px; }
.bars, .funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bar-row, .funnel-step { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 10px; border-radius: 9px; overflow: hidden; }
.bar-fill, .funnel-bar { position: absolute; inset: 0 auto 0 0; border-radius: 9px; background: rgba(244, 244, 247, 0.08); }
.funnel-bar { background: rgba(255, 30, 61, 0.2); }
.bar-label, .funnel-label { position: relative; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.bar-label small { color: var(--text-faint); font-weight: 500; margin-left: 4px; }
.bar-value, .funnel-value { position: relative; flex-shrink: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-value small, .funnel-value small { color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.bars-empty { margin: 0; color: var(--text-faint); font-size: 14px; }
.kv { display: grid; gap: 0; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv div:last-child { border-bottom: none; }
.kv dt { color: var(--text-muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.utm-builder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.utm-builder .field { margin: 0; }
.utm-result { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--surface-2); }
.utm-result code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--text-muted); }

.audit-score { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.audit-score p { margin: 0; font-size: 16px; font-weight: 700; }
.score-ring {
  display: grid; place-items: center; flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--score) * 1%), var(--surface-3) 0);
}
.score-ring b { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--surface); font-size: 18px; font-variant-numeric: tabular-nums; }
.audit { list-style: none; margin: 0; padding: 0; display: grid; }
.audit-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.audit-row div { display: grid; gap: 2px; min-width: 0; }
.audit-row strong { font-size: 14.5px; }
.audit-row span, .audit-row em { color: var(--text-muted); font-size: 13.5px; overflow-wrap: anywhere; }
.audit-row em { font-style: normal; color: var(--text); }
.audit-pill { flex-shrink: 0; min-width: 92px; margin-top: 1px; padding: 3px 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 800; text-align: center; }
.audit-row.is-ok .audit-pill { background: rgba(47, 191, 113, 0.14); color: #4fd88c; }
.audit-row.is-warn .audit-pill { background: rgba(224, 180, 58, 0.14); color: #e8c25a; }
.audit-row.is-ko .audit-pill { background: var(--danger-soft); color: var(--danger); }

.seo-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 18px; align-items: start; }
.seo-side { display: grid; gap: 18px; }
.seo-form .field { margin-top: 14px; }
.seo-form label { display: flex; justify-content: space-between; gap: 10px; }
.seo-form textarea.input { resize: vertical; min-height: 70px; }
.seo-sep { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.char-count { color: #4fd88c; font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
.char-count.is-off { color: #e8c25a; }
.seo-form .field-hint { margin: 6px 0 0; }
.seo-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; cursor: pointer; }
.seo-switch-row > span:first-child { display: grid; }
.seo-switch-row small { color: var(--text-muted); font-size: 13px; }

.serp { margin-top: 12px; padding: 16px; border-radius: 14px; background: #fff; color: #202124; font-family: Arial, sans-serif; }
.serp-site { display: flex; align-items: center; gap: 10px; }
.serp-site img { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: #f1f3f4; }
.serp-site span { display: grid; line-height: 1.25; }
.serp-site b { font-size: 14px; font-weight: 400; }
.serp-site small { color: #4d5156; font-size: 12px; }
.serp-title { margin-top: 8px; color: #1a0dab; font-size: 20px; line-height: 1.3; }
.serp-desc { margin-top: 4px; color: #4d5156; font-size: 14px; line-height: 1.58; }
.og-card { margin-top: 12px; overflow: hidden; border-radius: 14px; background: #1f2c34; }
.og-card img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.og-body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.og-body small { color: #8696a0; font-size: 12px; }
.og-body b { font-size: 14.5px; }
.og-body span { color: #aebac1; font-size: 13px; }
.seo-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-muted); font-size: 14px; }
.seo-steps b, .seo-steps code { color: var(--text); overflow-wrap: anywhere; }
.seo-steps code { font-family: var(--mono); font-size: 12.5px; }
.seo-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

@media (max-width: 860px) {
  .stats-5 { grid-template-columns: repeat(2, 1fr); }
  .stats-5 .stat { border-left: none !important; border-top: 1px solid var(--border); }
  .stats-5 .stat:nth-child(-n+2) { border-top: none; }
  .stats-5 .stat:nth-child(even) { border-left: 1px solid var(--border) !important; }
  .stats-grid, .seo-layout, .utm-builder { grid-template-columns: minmax(0, 1fr); }
  .admin-tabs { justify-self: stretch; }
  .admin-tab { flex: 1; text-align: center; padding: 8px 6px; }
  .audit-pill { min-width: 0; }
  .stats-5 .stat:last-child { grid-column: 1 / -1; border-left: none !important; }
  .chart-tick { font-size: 24px; }
  .chart-line { stroke-width: 4; }
}
