:root {
  --site-bg: #f7f7fb;
  --site-fg: #1a1d24;
  --site-muted: #5f6675;
  --site-border: #e6e8ef;
  --site-card: #ffffff;
  --site-accent: #6a3df0;
  --site-accent-soft: rgba(106, 61, 240, 0.12);
  --site-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] {
  --site-bg: #0f1117;
  --site-fg: #e6e8f0;
  --site-muted: #9aa3b2;
  --site-border: #1f232d;
  --site-card: #161a23;
  --site-accent: #9b7bff;
  --site-accent-soft: rgba(155, 123, 255, 0.16);
  --site-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body {
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Brand override on Bootstrap primary ---------- */
:root {
  --bs-primary: var(--site-accent);
  --bs-primary-rgb: 106, 61, 240;
  --bs-link-color: var(--site-accent);
  --bs-link-color-rgb: 106, 61, 240;
  --bs-link-hover-color: color-mix(in srgb, var(--site-accent) 75%, #000);
}
[data-bs-theme="dark"] {
  --bs-primary: var(--site-accent);
  --bs-primary-rgb: 155, 123, 255;
  --bs-link-color: var(--site-accent);
  --bs-link-color-rgb: 155, 123, 255;
  --bs-link-hover-color: color-mix(in srgb, var(--site-accent) 80%, #fff);
}

.btn-primary {
  --bs-btn-bg: var(--site-accent);
  --bs-btn-border-color: var(--site-accent);
  --bs-btn-hover-bg: color-mix(in srgb, var(--site-accent) 88%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--site-accent) 88%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--site-accent) 78%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--site-accent) 78%, #000);
  --bs-btn-disabled-bg: color-mix(in srgb, var(--site-accent) 55%, var(--site-bg));
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--site-accent) 55%, var(--site-bg));
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--site-accent) 28%, transparent);
  transition: transform 160ms ease, box-shadow 200ms ease, filter 200ms ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--site-accent) 40%, transparent);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-lg { border-radius: 12px; }

.btn-outline-primary {
  --bs-btn-color: var(--site-accent);
  --bs-btn-border-color: color-mix(in srgb, var(--site-accent) 55%, transparent);
  --bs-btn-hover-bg: var(--site-accent);
  --bs-btn-hover-border-color: var(--site-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: color-mix(in srgb, var(--site-accent) 88%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--site-accent) 88%, #000);
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-color: color-mix(in srgb, var(--site-accent) 55%, var(--site-muted));
  --bs-btn-disabled-border-color: color-mix(in srgb, var(--site-accent) 30%, transparent);
  font-weight: 600;
}

.btn-outline-secondary {
  --bs-btn-color: var(--site-fg);
  --bs-btn-border-color: var(--site-border);
  --bs-btn-hover-bg: var(--site-accent-soft);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--site-accent) 55%, transparent);
  --bs-btn-hover-color: var(--site-accent);
  --bs-btn-active-bg: var(--site-accent-soft);
  --bs-btn-active-border-color: var(--site-accent);
  --bs-btn-active-color: var(--site-accent);
  font-weight: 600;
}

.form-control:focus,
.form-select:focus {
  border-color: color-mix(in srgb, var(--site-accent) 60%, transparent);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--site-accent) 22%, transparent);
}

a { color: var(--site-accent); }
a:hover { color: color-mix(in srgb, var(--site-accent) 75%, var(--site-fg)); }

/* ---------- Topbar ---------- */
.site-topbar {
  background: var(--site-card);
  border-bottom: 1px solid var(--site-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.site-brand:hover { opacity: 0.85; }

.site-brand-img {
  height: 56px;
  width: auto;
  display: block;
}

.btn-studio {
  --studio-from: var(--site-accent);
  --studio-to: color-mix(in srgb, var(--site-accent) 55%, #ff4fb6);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--studio-from), var(--studio-to));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 6px 18px color-mix(in srgb, var(--site-accent) 40%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 240ms ease, filter 240ms ease;
}

.btn-studio:hover,
.btn-studio:focus {
  color: #fff;
  transform: translateY(-1px) scale(1.03);
  filter: saturate(1.15);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--site-accent) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-studio:active {
  transform: translateY(0) scale(0.98);
}

.btn-studio::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.btn-studio:hover::before {
  animation: btn-studio-shine 700ms ease;
}

@keyframes btn-studio-shine {
  from { left: -75%; }
  to { left: 130%; }
}

.btn-studio-icon {
  font-size: 0.95rem;
  animation: btn-studio-spin 6s linear infinite;
}

.btn-studio:hover .btn-studio-icon {
  animation-duration: 1.6s;
}

@keyframes btn-studio-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-studio,
  .btn-studio-icon,
  .btn-studio::before { animation: none; transition: none; }
}

#theme-icon { color: var(--site-fg); font-size: 1.05rem; }

.dashboard-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Landing ---------- */
.landing-hero {
  position: relative;
  background: linear-gradient(180deg, var(--site-bg) 0%, var(--site-card) 100%);
  border-bottom: 1px solid var(--site-border);
  overflow: hidden;
}

.landing-hero-glow {
  position: absolute;
  inset: -25% -10% auto auto;
  width: 70%;
  height: 130%;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--site-accent) 32%, transparent), transparent 70%),
    radial-gradient(closest-side, color-mix(in srgb, #ff4fb6 22%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.landing-eyebrow.on-dark { background: rgba(255,255,255,.12); color: #fff; }

.landing-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.landing-eyebrow-dot.pulse {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,.55);
  animation: landing-dot-pulse 1.6s infinite;
}
@keyframes landing-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.landing-title {
  font-size: clamp(1.75rem, 4.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.landing-title-accent {
  background: linear-gradient(120deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-lede {
  font-size: 1.15rem;
  color: var(--site-muted);
  max-width: 38rem;
}

.landing-trust {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin-top: 1.75rem;
  font-size: .88rem;
  color: var(--site-muted);
}
.landing-trust i { color: var(--site-accent); margin-right: .35rem; }

.landing-hero-card {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1.2rem;
  box-shadow: var(--site-shadow);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.landing-hero-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--site-bg) 60%, transparent);
}
.landing-hero-card-label {
  margin-left: auto;
  font-size: .75rem;
  color: var(--site-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.landing-hero-dot {
  width: 0.7rem; height: 0.7rem; border-radius: 50%; opacity: 0.8;
}

.landing-hero-card-body { padding: 1.75rem; text-align: center; }

.landing-lyric-line {
  font-size: 1rem;
  color: var(--site-muted);
  margin: 0.35rem 0;
  transition: color 0.3s ease, font-size 0.3s ease, opacity .3s ease;
  opacity: .45;
}

.landing-lyric-line.current {
  color: var(--site-fg);
  font-size: 1.55rem;
  font-weight: 700;
  opacity: 1;
}

.landing-lyric-line.next { color: var(--site-fg); opacity: 0.7; }

.landing-progress {
  height: 4px;
  background: var(--site-border);
  border-radius: 2px;
  overflow: hidden;
}

.landing-progress-bar {
  width: 38%;
  height: 100%;
  background: linear-gradient(90deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  animation: landing-progress 5s linear infinite;
}

@keyframes landing-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

.landing-hero-card-meta {
  display: flex; justify-content: space-between; gap: .5rem;
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: 1px solid var(--site-border);
  font-size: .78rem; color: var(--site-muted);
}
.landing-hero-card-meta i { color: var(--site-accent); margin-right: .3rem; }

/* ---------- Hero video showcase ---------- */
.landing-hero-video {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  aspect-ratio: 368 / 464;
  max-width: 480px;
  margin: 0 auto;
  background: #050608;
  border: 1px solid var(--site-border);
  box-shadow:
    0 30px 60px -25px color-mix(in srgb, var(--site-accent) 55%, transparent),
    0 12px 30px -10px rgba(0,0,0,.55);
  z-index: 1;
}

@media (min-width: 992px) {
  .landing-hero-video { max-width: 460px; }
}

.landing-hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(140deg,
    color-mix(in srgb, var(--site-accent) 75%, transparent),
    transparent 35%,
    color-mix(in srgb, #ff4fb6 65%, transparent) 75%,
    transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: .9;
}

.landing-hero-video-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-hero-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0,0,0,.35) 0%,
    rgba(0,0,0,0) 28%,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,.78) 100%);
}

.landing-hero-video-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.landing-hero-video-rec {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,.6);
  animation: landing-hero-rec 1.4s infinite;
}

@keyframes landing-hero-rec {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); opacity: 1; }
  70%  { box-shadow: 0 0 0 9px rgba(239,68,68,0); opacity: .85; }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); opacity: 1; }
}

.landing-hero-video-caption {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

.landing-hero-video-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}

.landing-hero-video-sub {
  margin-top: .25rem;
  font-size: .8rem;
  opacity: .85;
  letter-spacing: .02em;
}

@media (prefers-reduced-motion: reduce) {
  .landing-hero-video-rec { animation: none; }
}

/* ---------- Versus / comparison ---------- */
.landing-versus { background: var(--site-card); border-top: 1px solid var(--site-border); border-bottom: 1px solid var(--site-border); }

.landing-versus-card {
  position: relative;
  height: 100%;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--site-border);
  background: var(--site-bg);
  transition: transform .2s ease, border-color .2s ease;
}

.landing-versus-bad {
  opacity: .85;
}
.landing-versus-bad::before {
  content: "";
  position: absolute;
  left: 1.5rem; right: 1.5rem;
  top: 50%;
  height: 1px;
  background: color-mix(in srgb, var(--site-muted) 50%, transparent);
  transform: rotate(-4deg);
  opacity: .35;
  pointer-events: none;
}
.landing-versus-bad .landing-versus-tag {
  color: var(--site-muted);
}

.landing-versus-good {
  border-color: transparent;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--site-accent) 14%, var(--site-card)), var(--site-card));
  box-shadow: 0 14px 32px -18px color-mix(in srgb, var(--site-accent) 75%, transparent);
  transform: translateY(-2px);
}
.landing-versus-good::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.landing-versus-good .landing-versus-tag {
  color: var(--site-accent);
}
.landing-versus-good .landing-versus-tag i { margin-right: .3rem; }

.landing-versus-tag {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.landing-versus-text {
  color: var(--site-fg);
  font-size: .98rem;
  margin: 0;
  line-height: 1.5;
}
.landing-versus-bad .landing-versus-text { color: var(--site-muted); }

/* ---------- Section heads ---------- */
.landing-section-head {
  max-width: 720px;
  margin-bottom: 1.5rem;
}
.landing-section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 .5rem;
}
.landing-section-title.on-dark { color: #fff; }
.landing-section-lede {
  color: var(--site-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0;
}

/* ---------- Stats ---------- */
.landing-stats {
  background: var(--site-card);
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
  padding: 2rem 0;
}
.landing-stat {
  text-align: center;
  padding: .5rem 1rem;
}
.landing-stat-value {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.landing-stat-label {
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--site-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ---------- Features ---------- */
.landing-features { background: var(--site-bg); }

.landing-feature {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1.6rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color .2s ease;
}

.landing-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--site-shadow);
  border-color: color-mix(in srgb, var(--site-accent) 35%, var(--site-border));
}

.landing-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* ---------- Steps ---------- */
/* A landing usa o layout do feed (bottom nav fixa); abre espaço pro último
   conteúdo não ficar escondido atrás da barra. */
.landing-page {
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  /* Os gutters grandes das .row (g-5/g-4) dão margens negativas maiores que o
     padding do .container e vazam alguns px no mobile, gerando scroll horizontal
     que desloca a barra inferior fixa. Cortamos o overflow lateral aqui. */
  overflow-x: hidden;
}

/* Prévia do catálogo na landing (artistas + músicas) */
.landing-catalog-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
}
.landing-steps {
  background: var(--site-card);
  border-top: 1px solid var(--site-border);
  border-bottom: 1px solid var(--site-border);
}
.landing-step {
  position: relative;
  padding: 1.5rem;
  height: 100%;
  border-radius: 1rem;
  border: 1px solid var(--site-border);
  background: var(--site-bg);
  transition: border-color .2s ease, transform .2s ease;
}
.landing-step:hover { border-color: color-mix(in srgb, var(--site-accent) 35%, var(--site-border)); transform: translateY(-2px); }
.landing-step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--site-accent) 32%, transparent);
}

/* ---------- Boxes grid (landing) ---------- */
.landing-boxes { background: var(--site-bg); }
.landing-box-card {
  display: block;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  height: 100%;
}
.landing-box-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--site-shadow);
  border-color: color-mix(in srgb, var(--lb-primary, var(--site-accent)) 60%, var(--site-border));
  color: inherit;
}
.landing-box-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--lb-primary, var(--site-accent)), var(--lb-secondary, #1a1d24));
  overflow: hidden;
}
.landing-box-cover img:not(.landing-box-logo) {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.landing-box-cover-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--lb-primary, var(--site-accent)) 85%, transparent), transparent 60%),
    radial-gradient(100% 80% at 100% 100%, color-mix(in srgb, var(--lb-secondary, #1a1d24) 85%, transparent), transparent 60%);
}
.landing-box-cover-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.55) 100%);
}
.landing-box-logo {
  position: absolute;
  bottom: 1rem; left: 1rem;
  max-height: 44px;
  max-width: 55%;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}
.landing-box-name-overlay {
  position: absolute;
  bottom: 1rem; left: 1rem; right: 1rem;
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.landing-box-live {
  position: absolute;
  top: .85rem; right: .85rem;
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.landing-box-body { padding: 1rem 1.25rem 1.25rem; }
.landing-box-name { font-weight: 700; font-size: 1.05rem; }
.landing-box-loc {
  color: var(--site-muted);
  font-size: .88rem;
  margin-top: .15rem;
}
.landing-box-loc i { margin-right: .35rem; color: var(--site-accent); }
.landing-box-cta {
  margin-top: .9rem;
  font-weight: 600;
  font-size: .92rem;
  color: var(--site-accent);
  display: inline-flex; align-items: center; gap: .35rem;
}
.landing-box-cta i { transition: transform .2s ease; }
.landing-box-card:hover .landing-box-cta i { transform: translateX(4px); }

/* ---------- Owner pitch ---------- */
.landing-owner { background: var(--site-bg); }
.landing-owner-card {
  position: relative;
  border-radius: 1.5rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  color: #fff;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--site-accent) 65%, transparent), transparent 60%),
    linear-gradient(135deg, #1a1230 0%, #0f0c1e 100%);
  overflow: hidden;
  box-shadow: var(--site-shadow);
}
.landing-owner-card::before {
  content: ''; position: absolute; inset: auto -10% -30% auto;
  width: 50%; height: 80%;
  background: radial-gradient(closest-side, color-mix(in srgb, #ff4fb6 35%, transparent), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.landing-owner-lede {
  font-size: 1.05rem;
  color: rgba(255,255,255,.78);
  max-width: 540px;
}
.landing-owner-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: .55rem;
  color: rgba(255,255,255,.9);
  font-size: .98rem;
}
.landing-owner-list i {
  color: #22c55e;
  margin-right: .55rem;
  width: 1rem;
  display: inline-block;
}
.btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255,255,255,.3);
  --bs-btn-hover-bg: rgba(255,255,255,.12);
  --bs-btn-hover-border-color: rgba(255,255,255,.6);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: rgba(255,255,255,.18);
  --bs-btn-active-border-color: rgba(255,255,255,.7);
  --bs-btn-active-color: #fff;
  font-weight: 600;
}

.landing-owner-mock {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}
.landing-owner-mock-bar {
  width: 60px; height: 4px; border-radius: 4px;
  background: rgba(255,255,255,.2);
  margin: 0 auto 1rem;
}
.landing-owner-mock-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .85rem;
  border-radius: .75rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: .55rem;
}
.landing-owner-mock-row:last-child { margin-bottom: 0; }
.landing-owner-mock-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.landing-owner-mock-name { font-weight: 700; font-size: .95rem; color: #fff; }
.landing-owner-mock-song { font-size: .8rem; color: rgba(255,255,255,.6); }
.landing-owner-mock-badge {
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  padding: .25rem .55rem; border-radius: 999px;
  background: rgba(34,197,94,.2); color: #4ade80;
  border: 1px solid rgba(34,197,94,.4);
}
.landing-owner-mock-pos {
  font-size: .85rem; font-weight: 700; color: rgba(255,255,255,.5);
}

/* ---------- Social proof ---------- */
.landing-social { background: var(--site-bg); }
.landing-social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 576px) {
  .landing-social-grid { grid-template-columns: 1fr 1fr; }
}
.landing-social-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  transition: transform 0.2s ease, border-color .2s ease;
}
.landing-social-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--site-accent) 35%, var(--site-border));
}
.landing-social-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
}
.landing-social-name { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.landing-social-meta { font-size: .8rem; color: var(--site-muted); margin-top: .2rem; }
.landing-social-meta i { margin-right: .15rem; }

/* ---------- CTA ---------- */
.landing-cta { background: var(--site-card); border-top: 1px solid var(--site-border); }
.landing-cta .landing-section-lede { max-width: 520px; }

/* ---------- Dashboard layout ---------- */
.dashboard-body { background: var(--site-bg); min-height: 100vh; }

.dashboard-shell { display: flex; min-height: 100vh; }

.dashboard-sidebar {
  width: 260px;
  background: var(--site-card);
  border-right: 1px solid var(--site-border);
  flex-shrink: 0;
}

.dashboard-brand {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--site-border);
}

@media (max-width: 991.98px) {
  .dashboard-sidebar .offcanvas-header { padding-bottom: 0; }
  .dashboard-sidebar .dashboard-brand { padding-top: 0.25rem; }
}

.dashboard-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.dashboard-brand-link:hover { opacity: 0.85; }

.dashboard-brand-img {
  max-width: 100%;
  height: 80px;
  width: auto;
  display: block;
}

.dashboard-nav { padding: 0.75rem 0.5rem; display: flex; flex-direction: column; gap: 0.15rem; }

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  color: var(--site-fg);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s ease;
}

.dashboard-nav-link i { width: 1.2rem; color: var(--site-muted); }

.dashboard-nav-link:hover {
  background: var(--site-accent-soft);
  color: var(--site-accent);
}

.dashboard-nav-link:hover i { color: var(--site-accent); }

.dashboard-nav-link.active {
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-weight: 600;
}

.dashboard-nav-link.active i { color: var(--site-accent); }

.dashboard-nav-link.disabled { color: var(--site-muted); cursor: not-allowed; }

.dashboard-nav-section {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-muted);
  padding: 1rem 0.9rem 0.4rem;
}

.dashboard-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dashboard-topbar {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--site-card);
  border-bottom: 1px solid var(--site-border);
  position: relative;
}

.dashboard-topbar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 0;
  text-decoration: none;
  pointer-events: auto;
}

.dashboard-topbar-brand:hover { opacity: 0.85; }

.dashboard-topbar-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.dashboard-content { padding: 2rem 1.5rem; max-width: 1100px; width: 100%; margin: 0 auto; }

/* Bottom nav no Estúdio (mobile e desktop). Abre espaço no conteúdo e no
   sidebar pra barra fixa não cobrir os últimos itens. */
body.dashboard-body .dashboard-content { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
body.dashboard-body .dashboard-sidebar .offcanvas-body { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }

.dashboard-greeting { margin-bottom: 0.5rem; }

.dashboard-hero { margin: 1.25rem 0 0.5rem; }

.dashboard-hero-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #000));
  border: none;
  border-radius: 1.1rem;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--site-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.dashboard-hero-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.dashboard-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  animation: rec-pulse 1.6s ease-in-out infinite;
}
.dashboard-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dashboard-hero-title { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.dashboard-hero-subtitle { font-size: 0.92rem; opacity: 0.85; margin-top: 0.2rem; }
.dashboard-hero-arrow { font-size: 1.2rem; opacity: 0.85; flex-shrink: 0; }

/* Variante "Ver o feed": mesmo formato, cor diferente e sem o pulse de gravação. */
.dashboard-hero-btn--feed {
  text-decoration: none;
  background: linear-gradient(135deg, #ff4fb6, color-mix(in srgb, #ff4fb6 55%, #000));
}
.dashboard-hero-icon--feed { animation: none; }

.dashboard-card {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  height: 100%;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-card:hover { transform: translateY(-2px); box-shadow: var(--site-shadow); }

@property --dashboard-card-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.dashboard-card-featured {
  border-color: transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--site-accent) 12%, var(--site-card)), var(--site-card) 70%);
  box-shadow: 0 8px 24px -14px color-mix(in srgb, var(--site-accent) 70%, transparent);
}

.dashboard-card-featured::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--dashboard-card-angle),
    color-mix(in srgb, var(--site-accent) 25%, transparent) 0%,
    var(--site-accent) 18%,
    color-mix(in srgb, var(--site-accent) 60%, #ff4fb6) 32%,
    color-mix(in srgb, var(--site-accent) 25%, transparent) 50%,
    color-mix(in srgb, var(--site-accent) 25%, transparent) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: dashboard-card-border-spin 4s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.dashboard-card-featured:hover {
  box-shadow: 0 14px 32px -10px color-mix(in srgb, var(--site-accent) 80%, transparent);
}

.dashboard-card-featured:hover::before {
  animation-duration: 2s;
}

@keyframes dashboard-card-border-spin {
  to { --dashboard-card-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-card-featured::before { animation: none; }
}

.dashboard-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dashboard-list .list-group-item {
  background: var(--site-card);
  color: var(--site-fg);
  border-color: var(--site-border);
}

@media (max-width: 991.98px) {
  .dashboard-sidebar.offcanvas-lg { width: 280px; }
}

/* ---------- Page shell (internal pages) ---------- */
.page-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Layout do feed é mobile-first: nada deve sangrar na horizontal e cortar o conteúdo. */
body.feed-body { overflow-x: hidden; }
body.feed-body .page-shell { width: 100%; }

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.page-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-accent);
  margin-bottom: 0.4rem;
}

.page-eyebrow a { color: inherit; }
.page-eyebrow a:hover { opacity: 0.8; }

.page-title {
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.page-subtitle { font-size: 0.95rem; }

.page-card {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1.75rem;
}

/* ---------- Songs filter ---------- */
.songs-filter-form { margin-bottom: 0.75rem; }
/* Barra de busca padrão (songs, artistas, comunidade): input com lupa-botão
   de submit à direita e botão de limpar logo à esquerda dele. */
.app-search {
  position: relative;
  display: flex;
  align-items: center;
}
.app-search .form-control {
  width: 100%;
  padding-left: 1rem;
  padding-right: 3rem;
  height: 2.7rem;
  border-radius: 0.75rem;
  background: var(--site-card);
  border-color: var(--site-border);
  color: var(--site-fg);
}
.app-search .form-control::placeholder { color: var(--site-muted); }
.app-search .form-control:focus {
  border-color: var(--site-accent);
  box-shadow: 0 0 0 0.15rem var(--site-accent-soft);
}
.app-search-btn {
  position: absolute;
  right: 0.3rem;
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--site-accent);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.app-search-btn:hover { filter: brightness(1.08); }
.app-search-btn:active { transform: scale(.94); }
.app-search-clear {
  position: absolute;
  right: 2.9rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--site-muted);
  background: color-mix(in srgb, var(--site-muted) 18%, transparent);
  text-decoration: none;
  font-size: 0.8rem;
}
.app-search-clear:hover { color: var(--site-fg); background: var(--site-accent-soft); }
.songs-filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Painel de filtros (collapse): ordenação + filtros agrupados. */
.songs-filter-panel {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
}
.songs-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.songs-filter-group + .songs-filter-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--site-border);
}
.songs-filter-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-muted);
  font-weight: 700;
  margin-right: 0.25rem;
}

/* ---------- Song list ---------- */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.85rem;
  text-decoration: none;
  color: var(--site-fg);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.song-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--site-shadow);
  border-color: var(--site-accent-soft);
  color: var(--site-fg);
}

.song-item-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 0.7rem;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.song-item-cover {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--site-accent-soft);
}
.song-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.song-item-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-accent);
  font-size: 1.1rem;
}

.song-item-body { flex: 1; min-width: 0; }

.song-item-title {
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 0.15rem;
}

.song-item-meta {
  font-size: 0.85rem;
  color: var(--site-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  min-width: 0;
}
.song-item-meta .song-item-artist {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}
.song-item-dot { opacity: 0.5; }

.song-item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--site-muted);
}
.song-item-stats span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.song-item-stats i { color: var(--site-accent); opacity: 0.75; font-size: 0.85em; }

.song-item-chevron {
  color: var(--site-muted);
  font-size: 0.85rem;
  transition: transform 0.15s ease;
}

.song-item:hover .song-item-chevron {
  transform: translateX(2px);
  color: var(--site-accent);
}

/* ---------- Karaoke card ---------- */
.karaoke-card {
  padding: 2rem;
  text-align: center;
}

.karaoke-card audio {
  border-radius: 0.5rem;
}

/* ---------- Empty state ---------- */
.empty-state {
  background: var(--site-card);
  border: 1px dashed var(--site-border);
  border-radius: 1rem;
  padding: 3rem 1.5rem;
  text-align: center;
}

.empty-state-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* ---------- Comunidade (explorar + feed) ---------- */

.community-tabs {
  display: flex;
  gap: .25rem;
  padding: .25rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 999px;
}
.community-tab {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--site-muted);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.community-tab:hover { color: var(--site-fg); background: color-mix(in srgb, var(--site-fg) 6%, transparent); }
.community-tab.is-active {
  background: var(--site-accent);
  color: #fff;
}
.community-tab-count {
  font-size: .72rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--site-fg) 10%, transparent);
  color: inherit;
  font-weight: 700;
}
.community-tab.is-active .community-tab-count {
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* Lista de pessoas estilo Instagram: linhas compactas, sem cards. */
.community-user-list {
  display: flex;
  flex-direction: column;
}

.community-user-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--site-border);
}
.community-user-row:last-child { border-bottom: 0; }
.community-user-row > form { flex-shrink: 0; }

.community-user-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: inherit;
}
.community-user-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  overflow: hidden;
}
.community-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-user-id { min-width: 0; }
.community-user-name {
  font-weight: 600;
  color: var(--site-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.community-user-handle {
  color: var(--site-muted);
  font-size: .85rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.community-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: .2rem;
  color: var(--site-muted);
  font-size: .75rem;
}
.community-user-meta i { margin-right: .2rem; opacity: .85; }
.community-user-meta .is-streak { color: #f97316; }

.community-follow-btn {
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 999px;
  font-weight: 600;
}
/* Sem o glow do btn-primary: ele vazava ~18px e era cortado na borda direita. */
.community-user-row .community-follow-btn,
.community-user-row .community-follow-btn:hover,
.community-user-row .community-follow-btn:focus,
.community-user-row .community-follow-btn:active {
  box-shadow: none !important;
  transform: none;
}
.community-follow-btn i { margin-right: .35rem; }
.community-follow-btn.is-following {
  --bs-btn-color: var(--site-muted);
  --bs-btn-border-color: var(--site-border);
}
.community-follow-btn.is-following:hover {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bs-danger);
  --bs-btn-border-color: var(--bs-danger);
}
.community-follow-btn.is-following:hover .fa-check::before { content: "\f00d"; /* fa-times */ }

/* ---------- Ranking redesign ---------- */
.ranking-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.ranking-toggle {
  display: inline-flex;
  padding: .25rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 999px;
}
.ranking-toggle-btn {
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--site-muted);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.ranking-toggle-btn:hover { color: var(--site-fg); }
.ranking-toggle-btn.is-active {
  background: var(--site-accent);
  color: #fff;
}

/* Podium top-3 */
.ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.ranking-podium-card {
  position: relative;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1.1rem;
  padding: 1.5rem 1rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  overflow: hidden;
  transition: transform .25s ease;
}
.ranking-podium-card:hover { transform: translateY(-3px); }

.ranking-podium-card.is-place-1 {
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, #fbbf24 28%, transparent), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, #fbbf24 8%, var(--site-card)), var(--site-card));
  border-color: color-mix(in srgb, #fbbf24 55%, var(--site-border));
  box-shadow: 0 18px 40px -20px color-mix(in srgb, #fbbf24 60%, transparent);
  transform: translateY(-12px);
}
.ranking-podium-card.is-place-1:hover { transform: translateY(-16px); }

.ranking-podium-card.is-place-2 {
  border-color: color-mix(in srgb, #cbd5e1 55%, var(--site-border));
  background: linear-gradient(180deg, color-mix(in srgb, #cbd5e1 5%, var(--site-card)), var(--site-card));
}

.ranking-podium-card.is-place-3 {
  border-color: color-mix(in srgb, #cd7f32 50%, var(--site-border));
  background: linear-gradient(180deg, color-mix(in srgb, #cd7f32 6%, var(--site-card)), var(--site-card));
}

.ranking-podium-card.is-me {
  outline: 2px solid var(--site-accent);
  outline-offset: -1px;
}

.ranking-podium-rank {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--site-muted);
}
.ranking-podium-card.is-place-1 .ranking-podium-rank { color: #fbbf24; }
.ranking-podium-card.is-place-2 .ranking-podium-rank { color: #94a3b8; }
.ranking-podium-card.is-place-3 .ranking-podium-rank { color: #cd7f32; }
.ranking-podium-rank i { font-size: 1.1rem; }
.ranking-podium-card.is-place-1 .ranking-podium-rank i { font-size: 1.4rem; }

.ranking-podium-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  text-decoration: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--site-accent) 35%, transparent);
}
.ranking-podium-card.is-place-1 .ranking-podium-avatar {
  width: 80px; height: 80px; font-size: 1.7rem;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 10px 22px color-mix(in srgb, #fbbf24 55%, transparent);
}

.ranking-podium-name {
  font-weight: 700;
  color: var(--site-fg);
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-podium-name:hover { color: var(--site-accent); }

.ranking-podium-level {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--site-muted);
}

.ranking-podium-points {
  margin-top: .25rem;
  display: flex; align-items: baseline; gap: .35rem;
}
.ranking-podium-points strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--site-fg);
}
.ranking-podium-card.is-place-1 .ranking-podium-points strong { font-size: 1.85rem; }
.ranking-podium-points span { color: var(--site-muted); font-size: .8rem; font-weight: 600; }

.ranking-podium-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem .85rem;
  color: var(--site-muted);
  font-size: .78rem;
}
.ranking-podium-meta i { margin-right: .25rem; color: var(--site-accent); opacity: .8; }

/* Lista de posições 4+ */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1.1rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: .85rem;
  transition: border-color .15s ease, transform .15s ease;
}
.ranking-row:hover {
  border-color: color-mix(in srgb, var(--site-accent) 35%, var(--site-border));
}
.ranking-row.is-me {
  border-color: var(--site-accent);
  background: color-mix(in srgb, var(--site-accent) 6%, var(--site-card));
}

.ranking-row-pos {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.ranking-row-num {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--site-muted);
  min-width: 1.5em;
  text-align: center;
}
.ranking-row.is-me .ranking-row-num { color: var(--site-accent); }

.ranking-trend {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.ranking-trend-up   { color: #22c55e; background: color-mix(in srgb, #22c55e 14%, transparent); }
.ranking-trend-down { color: #ef4444; background: color-mix(in srgb, #ef4444 14%, transparent); }
.ranking-trend-flat { color: var(--site-muted); background: color-mix(in srgb, var(--site-muted) 12%, transparent); }
.ranking-trend-new  { color: var(--site-accent); background: var(--site-accent-soft); }

.ranking-row-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.ranking-row-name {
  font-weight: 700;
  color: var(--site-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-row-handle {
  font-size: .78rem;
  color: var(--site-muted);
}

.ranking-row-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: flex-end;
}

.ranking-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-size: .76rem;
  font-weight: 600;
}
.ranking-chip-streak {
  background: color-mix(in srgb, #f97316 16%, transparent);
  color: #f97316;
}
.ranking-chip-muted {
  background: color-mix(in srgb, var(--site-muted) 16%, transparent);
  color: var(--site-muted);
}

.ranking-row-points {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  text-align: right;
  min-width: 4.5rem;
  justify-content: flex-end;
}
.ranking-row-points strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--site-fg);
}
.ranking-row-points span {
  font-size: .72rem;
  color: var(--site-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ranking-row-action .btn { white-space: nowrap; }

@media (max-width: 768px) {
  .ranking-podium {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .ranking-podium-card.is-place-1 { transform: none; }
  .ranking-podium-card.is-place-1:hover { transform: translateY(-3px); }

  .ranking-row {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    row-gap: .65rem;
  }
  .ranking-row-pos { grid-row: 1; grid-column: 1; }
  .ranking-row-user { grid-row: 1; grid-column: 2; }
  .ranking-row-points { grid-row: 1; grid-column: 3; }
  .ranking-row-indicators { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; }
  .ranking-row-action { grid-row: 2; grid-column: 3; align-self: end; }
}

/* ---------- Danger zone ---------- */
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--bs-danger) 40%, var(--site-border));
  border-radius: 0.85rem;
  background: color-mix(in srgb, var(--bs-danger) 6%, transparent);
}

/* ---------- Play (fullscreen Spotify-like) ---------- */
.play-body {
  background: var(--site-bg);
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
}

.player-root {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, var(--site-bg) 0%, var(--site-card) 100%);
  transition: grid-template-rows 0.35s ease;
}

/* Auto-hide das barras (topo, controles e fila) após inatividade tocando.
   Colapsa as linhas do grid pra o conteúdo central ocupar a tela. */
.player-topbar,
.player-controls {
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.player-queue { transition: opacity 0.3s ease; }

.player-root.is-idle {
  grid-template-rows: 0 1fr 0;
  cursor: none;
}
.player-root.is-idle .player-topbar,
.player-root.is-idle .player-controls,
.player-root.is-idle .player-queue {
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .player-root,
  .player-topbar,
  .player-controls,
  .player-queue { transition: none; }
}

.player-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: transparent;
}

.player-back { color: var(--site-fg); flex-shrink: 0; }
.player-back-label { margin-left: 0.5rem; }
/* No celular, só o ícone de voltar pra ganhar espaço na barra. */
@media (max-width: 640px) {
  .player-back-label { display: none; }
}

/* Botão Transmitir (cast) — destacado quando conectado a uma TV */
.player-btn-cast.active { color: var(--site-accent, #6a3df0); }

/* Pontuação de canto (experimental) */
.player-btn-score.active { color: var(--site-accent, #6a3df0); }
.player-score-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  animation: intro-fade-in 0.25s ease;
}
.player-score-overlay[hidden] { display: none; }
.player-score-card {
  text-align: center;
  color: #fff;
  padding: 2rem 2.5rem;
  border-radius: 1.25rem;
  background: radial-gradient(circle at 50% 0%, var(--site-accent, #6a3df0) 0%, rgba(0, 0, 0, 0.85) 72%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.player-score-eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}
.player-score-value { font-size: 5rem; font-weight: 800; line-height: 1; margin: 0.3rem 0; }
.player-score-message { font-size: 1.1rem; opacity: 0.95; }

.player-meta-top {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.player-title {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-subtitle {
  font-size: 0.8rem;
  color: var(--site-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-subtitle a { color: var(--site-accent); text-decoration: none; }

.player-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding: 0 2rem 1.5rem;
  min-height: 0;
  overflow: hidden;
}

.player-root.hide-queue .player-stage { grid-template-columns: 1fr; }
.player-root.hide-queue .player-queue { display: none; }

/* Sem próximas músicas (só a atual): não mostra a caixa de fila. */
.player-root.queue-empty .player-stage { grid-template-columns: 1fr; }
.player-root.queue-empty .player-queue { display: none; }

/* ----- Modo vídeo (karaokê em MP4): só o vídeo + controles embaixo ----- */
.player-video-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 2;
}
.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.player-root.video-mode .player-stage { grid-template-columns: 1fr; padding: 0; }
.player-root.video-mode .player-lights,
.player-root.video-mode .player-lyrics-wrap,
.player-root.video-mode .player-queue { display: none; }
/* Pitch shift e auto-next dependem do Web Audio (só áudio) */
.player-root.video-mode .player-pitch { display: none; }

/* Vídeo cobre o player inteiro; topbar e controles flutuam por cima */
.player-root.video-mode .player-video-wrap { position: fixed; inset: 0; z-index: 1; }
.player-root.video-mode .player-topbar,
.player-root.video-mode .player-controls {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  border: none;
}
.player-root.video-mode .player-topbar {
  top: 0;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent);
}
.player-root.video-mode .player-controls {
  bottom: 0;
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
}
.player-root.video-mode .player-btn,
.player-root.video-mode .player-back,
.player-root.video-mode .player-title,
.player-root.video-mode .player-subtitle,
.player-root.video-mode .player-time { color: #fff; }

/* Botão de tela cheia: só no modo vídeo */
.player-btn-fullscreen { display: none; }
.player-root.video-mode .player-btn-fullscreen { display: inline-flex; }

/* Tela final: sugestões + voltar ao catálogo quando a fila acaba */
.player-endscreen {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--site-accent) 30%, #000) 0%, rgba(0,0,0,.94) 60%),
    rgba(0,0,0,.85);
  color: #fff;
  opacity: 0;
  transition: opacity .3s ease;
}
.player-endscreen[hidden] { display: none; }
.player-endscreen.is-active { opacity: 1; }

.player-endscreen-inner {
  width: 100%;
  max-width: 980px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.player-endscreen-head { text-align: center; }
.player-endscreen-eyebrow {
  display: inline-block;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.player-endscreen-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.player-endscreen-sub {
  color: rgba(255,255,255,.7);
  margin: 0;
  font-size: 1rem;
}
.player-endscreen-sub strong { color: #fff; font-weight: 700; }

.player-endscreen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.player-endscreen-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: .9rem;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.player-endscreen-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--site-accent) 70%, transparent);
  background: rgba(255,255,255,.06);
  color: inherit;
}

.player-endscreen-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, color-mix(in srgb, var(--site-accent) 40%, #1a1d24), #0f1117);
  overflow: hidden;
}
.player-endscreen-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.player-endscreen-cover-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.4);
  font-size: 2rem;
}
.player-endscreen-play {
  position: absolute;
  bottom: .55rem; right: .55rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--site-accent);
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.5);
  transform: translateY(6px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.player-endscreen-card:hover .player-endscreen-play {
  transform: translateY(0);
  opacity: 1;
}

.player-endscreen-meta {
  padding: .7rem .85rem .85rem;
}
.player-endscreen-song {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.player-endscreen-artist {
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  margin-top: .25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-endscreen-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: .25rem;
}

@property --endscreen-cta-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.player-endscreen-cta {
  position: relative;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--site-accent), var(--site-accent)) padding-box,
    conic-gradient(from var(--endscreen-cta-angle),
      color-mix(in srgb, var(--site-accent) 25%, transparent) 0%,
      var(--site-accent) 16%,
      color-mix(in srgb, var(--site-accent) 55%, #ff4fb6) 30%,
      #ffffff 44%,
      color-mix(in srgb, var(--site-accent) 55%, #ff4fb6) 58%,
      color-mix(in srgb, var(--site-accent) 25%, transparent) 78%,
      color-mix(in srgb, var(--site-accent) 25%, transparent) 100%) border-box;
  box-shadow: 0 10px 32px -12px color-mix(in srgb, var(--site-accent) 80%, transparent);
  animation: endscreen-cta-spin 3.5s linear infinite;
}

.player-endscreen-cta:hover,
.player-endscreen-cta:focus-visible {
  background:
    linear-gradient(color-mix(in srgb, var(--site-accent) 88%, #fff), color-mix(in srgb, var(--site-accent) 88%, #fff)) padding-box,
    conic-gradient(from var(--endscreen-cta-angle),
      color-mix(in srgb, var(--site-accent) 25%, transparent) 0%,
      var(--site-accent) 16%,
      color-mix(in srgb, var(--site-accent) 55%, #ff4fb6) 30%,
      #ffffff 44%,
      color-mix(in srgb, var(--site-accent) 55%, #ff4fb6) 58%,
      color-mix(in srgb, var(--site-accent) 25%, transparent) 78%,
      color-mix(in srgb, var(--site-accent) 25%, transparent) 100%) border-box;
  animation-duration: 1.8s;
  box-shadow: 0 14px 38px -10px color-mix(in srgb, var(--site-accent) 90%, transparent);
}

@keyframes endscreen-cta-spin {
  to { --endscreen-cta-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .player-endscreen-cta { animation: none; }
}

@media (max-width: 480px) {
  .player-endscreen-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .player-endscreen-play { opacity: 1; transform: translateY(0); width: 32px; height: 32px; }
}

/* Abertura cinematográfica (enquanto a mídia prepara, antes de tocar) */
.player-intro {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  color: #fff;
  /* Fundo 100% opaco: com rgba(0,0,0,.94) o palco (e a letra gravada no
     frame do vídeo) vazava como fantasma atrás do número da contagem,
     dando a impressão de frase cortada embaixo. */
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--site-accent) 32%, #000) 0%, #000 70%);
  animation: intro-fade-in .3s ease;
}
.player-intro[hidden] { display: none; }
.player-intro.is-leaving { animation: intro-fade-out .35s ease forwards; }

.player-intro-logo {
  position: absolute;
  top: 50%; left: 50%;
  width: min(74vw, 460px);
  transform: translate(-50%, -50%) scale(.6);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 10px 34px color-mix(in srgb, var(--site-accent) 65%, transparent));
}
.player-intro-logo.show { animation: intro-logo-in .7s cubic-bezier(.22,.68,.21,1.01) forwards; }
.player-intro-logo.out { animation: intro-logo-out .38s ease forwards; }
@keyframes intro-logo-in {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.6) rotate(-3deg); }
  60%  { opacity: 1; transform: translate(-50%,-50%) scale(1.05) rotate(0deg); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
@keyframes intro-logo-out {
  to { opacity: 0; transform: translate(-50%,-50%) scale(1.1); }
}

.player-intro-count {
  display: none; align-items: center; justify-content: center;
  font-size: 6rem; font-weight: 800; line-height: 1;
  color: #fff; text-shadow: 0 6px 28px rgba(0,0,0,.6);
}
.player-intro-count.show { display: flex; }
.player-intro-count.pop { animation: intro-count-pop .8s ease; }

.player-intro-slogan {
  display: none;
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 1.1;
  text-align: center;
  padding: 0 1.5rem;
  background: linear-gradient(100deg, #8a6a12 0%, #e3b528 22%, #fff3bf 50%, #e3b528 78%, #8a6a12 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(255, 200, 70, .4));
}
.player-intro-slogan.show {
  display: block;
  animation: intro-slogan-in .55s cubic-bezier(.22,.68,.21,1.01) both, intro-shine 2s linear .2s infinite;
}
@keyframes intro-slogan-in {
  0%   { opacity: 0; transform: scale(.8) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes intro-shine {
  from { background-position: 220% center; }
  to   { background-position: -220% center; }
}

/* Frases passando logo abaixo da logo enquanto a música carrega */
.player-intro-phrases {
  position: absolute;
  top: calc(50% + min(17vw, 108px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 88vw;
  text-align: center;
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: clamp(1.2rem, 4.4vw, 2rem);
  line-height: 1.1;
  white-space: nowrap;
  color: color-mix(in srgb, #fff3bf 88%, var(--site-accent));
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
}
.player-intro-phrases.show { animation: intro-phrase-in .5s ease both; }
@keyframes intro-phrase-in {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px); }
  100% { opacity: .92; transform: translateX(-50%) translateY(0); }
}

/* Barra fininha de progresso do carregamento, colada no rodapé */
.player-intro-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, .12);
  transition: opacity .35s ease;
}
.player-intro-progress.done { opacity: 0; }
.player-intro-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--site-accent), #fff3bf);
  box-shadow: 0 0 10px color-mix(in srgb, var(--site-accent) 70%, transparent);
  transition: width .2s ease;
}

@keyframes intro-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes intro-fade-out { to { opacity: 0; } }
@keyframes intro-count-pop {
  0% { transform: scale(.4); opacity: 0; }
  35% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 991.98px) {
  .player-stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }

  /* Em playlists, a fila vira uma barra recolhível no rodapé do palco,
     recolhida por padrão pra dar foco total à letra. Toca no cabeçalho
     pra abrir/fechar. Quando não há próximas (.queue-empty), some de vez. */
  .player-queue { align-self: end; padding: 0.6rem 0.85rem; }
  .player-queue-header { cursor: pointer; padding-bottom: 0; border-bottom: none; }
  .player-queue-chevron { display: inline-block; transition: transform 0.2s ease; }
  .player-queue-list { display: none; max-height: 40vh; }
  .player-root.mobile-queue-open .player-queue-list { display: block; }
  .player-root.mobile-queue-open .player-queue-header {
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--site-border);
  }
  .player-root.mobile-queue-open .player-queue-chevron { transform: rotate(180deg); }
}
@media (max-width: 991.98px) {
  /* Botões da topbar que só fazem sentido no desktop */
  .player-topbar-desktop { display: none; }
}

@media (max-width: 767.98px) {
  .player-stage {
    padding: 0 1rem 6rem;
    gap: 1rem;
  }
  .player-topbar { padding: 0.75rem 1rem; gap: 0.5rem; }
  .player-title { font-size: 0.95rem; }
  .player-subtitle { font-size: 0.75rem; }

  /* Controles em duas linhas: transport + tempo na 1ª, progresso full-width na 2ª.
     Fixos no rodapé pra sempre aparecerem mesmo quando a letra for grande. */
  .player-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 0.4rem 0.75rem 0.6rem;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(0,0,0,0.08);
  }
  .player-controls-row { flex-wrap: wrap; row-gap: 0.4rem; column-gap: 0.4rem; }
  .player-progress-wrap { flex: 1 1 100%; order: 10; height: 18px; }
  .player-volume { display: none; }
  .player-autoplay { display: none; }
  /* Barra enxuta no celular: sem os tempos da música (basta a barra de progresso). */
  .player-time { display: none; }
  /* Tela cheia fica como último botão, encostado à direita. */
  .player-btn-fullscreen { margin-left: auto; }
  .player-btn { width: 32px; height: 32px; font-size: 0.95rem; }
  .player-btn-play { width: 40px; height: 40px; font-size: 1rem; }
}

/* ---------- Canhões de luz (lighting presets) ---------- */
.player-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  --light-intensity: 0.6;
  --beat-pulse: 0;
}

/* A varredura (rotate) é conduzida por stage_lights.js: fase contínua sem
   saltos quando a velocidade muda, e parada quando não há música tocando.
   --beat-pulse (0..1) pisca no ritmo; --lamp-flash alterna o flash por lâmpada. */
.player-lights .player-light {
  position: absolute;
  top: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  --lamp-pulse: calc(var(--beat-pulse, 0) * var(--lamp-flash, 1));
  box-shadow:
    0 0 calc(18px + 80px * var(--lamp-pulse)) currentColor,
    0 0 calc(4px + 30px * var(--lamp-pulse)) #fff;
  transform-origin: 50% -6px;
  transition: box-shadow 60ms linear;
}

.player-lights .player-light::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 280px;
  height: 90vh;
  margin-left: -140px;
  background: linear-gradient(to bottom, currentColor 0%, transparent 75%);
  clip-path: polygon(46% 0%, 54% 0%, 100% 100%, 0% 100%);
  /* Entre batidas o feixe fica a 55% da intensidade; na batida estoura — é o
     contraste que faz o piscar ler como ritmo (só somar em cima da base não
     aparece com o feixe já claro). */
  filter: blur(calc(18px - 12px * var(--lamp-pulse, 0))) brightness(calc(1 + 0.8 * var(--lamp-pulse, 0)));
  opacity: min(1, calc(var(--light-intensity, 0.6) * (0.55 + 1.2 * var(--lamp-pulse, 0))));
  mix-blend-mode: screen;
  transition: opacity 60ms linear, filter 60ms linear;
}

.player-lights .player-light:nth-child(1) { left: 14%; }
.player-lights .player-light:nth-child(2) { left: 36%; }
.player-lights .player-light:nth-child(3) { left: 64%; }
.player-lights .player-light:nth-child(4) { left: 86%; }

/* Preset: classic — brancos quentes suaves */
.player-lights[data-preset="classic"] .player-light:nth-child(1) { color: #ffe4a8; }
.player-lights[data-preset="classic"] .player-light:nth-child(2) { color: #ffffff; }
.player-lights[data-preset="classic"] .player-light:nth-child(3) { color: #fff3cb; }
.player-lights[data-preset="classic"] .player-light:nth-child(4) { color: #fff0b0; }

/* Preset: warm — vermelhos/âmbares */
.player-lights[data-preset="warm"] .player-light:nth-child(1) { color: #ff501e; }
.player-lights[data-preset="warm"] .player-light:nth-child(2) { color: #ffa03c; }
.player-lights[data-preset="warm"] .player-light:nth-child(3) { color: #ff6450; }
.player-lights[data-preset="warm"] .player-light:nth-child(4) { color: #ffc864; }

/* Preset: cold — azuis/violetas */
.player-lights[data-preset="cold"] .player-light:nth-child(1) { color: #50c8ff; }
.player-lights[data-preset="cold"] .player-light:nth-child(2) { color: #7882ff; }
.player-lights[data-preset="cold"] .player-light:nth-child(3) { color: #a064ff; }
.player-lights[data-preset="cold"] .player-light:nth-child(4) { color: #3cdcdc; }

/* Preset: rave — cores fortes trocando rápido (a varredura fica com o JS) */
.player-lights[data-preset="rave"] .player-light:nth-child(1) {
  color: #ff00c8;
  animation: lamp-blink-a 0.6s steps(4) infinite;
}
.player-lights[data-preset="rave"] .player-light:nth-child(2) {
  color: #00dcff;
  animation: lamp-blink-b 0.6s steps(4) infinite;
}
.player-lights[data-preset="rave"] .player-light:nth-child(3) {
  color: #ffff00;
  animation: lamp-blink-c 0.6s steps(4) infinite;
}
.player-lights[data-preset="rave"] .player-light:nth-child(4) {
  color: #00ff64;
  animation: lamp-blink-d 0.6s steps(4) infinite;
}
@keyframes lamp-blink-a {
  0%, 100% { color: #ff00c8; } 25% { color: #00dcff; } 50% { color: #ffff00; } 75% { color: #00ff64; }
}
@keyframes lamp-blink-b {
  0%, 100% { color: #00dcff; } 25% { color: #ffff00; } 50% { color: #00ff64; } 75% { color: #ff00c8; }
}
@keyframes lamp-blink-c {
  0%, 100% { color: #ffff00; } 25% { color: #00ff64; } 50% { color: #ff00c8; } 75% { color: #00dcff; }
}
@keyframes lamp-blink-d {
  0%, 100% { color: #00ff64; } 25% { color: #ff00c8; } 50% { color: #00dcff; } 75% { color: #ffff00; }
}

/* Preset: rainbow — varredura de matiz contínua */
@property --lamp-hue {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}
.player-lights[data-preset="rainbow"] .player-light:nth-child(1) {
  --lamp-hue: 0;
  color: hsl(var(--lamp-hue), 100%, 65%);
  animation: lamp-rainbow 6s linear infinite;
}
.player-lights[data-preset="rainbow"] .player-light:nth-child(2) {
  --lamp-hue: 90;
  color: hsl(var(--lamp-hue), 100%, 65%);
  animation: lamp-rainbow 6s linear infinite -1.5s;
}
.player-lights[data-preset="rainbow"] .player-light:nth-child(3) {
  --lamp-hue: 180;
  color: hsl(var(--lamp-hue), 100%, 65%);
  animation: lamp-rainbow 6s linear infinite -3s;
}
.player-lights[data-preset="rainbow"] .player-light:nth-child(4) {
  --lamp-hue: 270;
  color: hsl(var(--lamp-hue), 100%, 65%);
  animation: lamp-rainbow 6s linear infinite -4.5s;
}
@keyframes lamp-rainbow {
  to { --lamp-hue: 360; }
}

/* Garantir que o conteúdo do palco fique acima dos canhões */
.player-lyrics-wrap,
.player-queue { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .player-lights .player-light { animation: none !important; }
}

.player-lyrics-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.player-lyrics {
  text-align: center;
  width: 100%;
  max-width: 1200px;
  padding: 0 1rem;
}

.player-lyric {
  transition: opacity 0.3s ease, font-size 0.3s ease, color 0.3s ease, transform 0.3s ease;
  margin: 1.5rem 0;
  color: var(--site-fg);
  line-height: 1.15;
}

.player-lyric.current {
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  min-height: 1.15em;
}

.player-lyric.next {
  font-size: clamp(1.3rem, 3vw, 2.4rem);
  color: var(--site-muted);
  opacity: 0.6;
  min-height: 1.15em;
}

.player-queue {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.player-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--site-muted);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--site-border);
}
.player-queue-heading { display: inline-flex; align-items: center; gap: 0.4rem; }
.player-queue-chevron { display: none; font-size: 0.8em; }
.player-queue-count {
  font-size: 0.78rem;
  color: var(--site-accent);
  background: var(--site-accent-soft);
  border-radius: 999px;
  padding: 0 0.45rem;
  font-variant-numeric: tabular-nums;
}
.player-queue-count:empty { display: none; }

.player-queue-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  overflow-y: auto;
  min-height: 0;
}

.player-queue-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}
.player-queue-item:hover { background: var(--site-accent-soft); }
.player-queue-item.active {
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-weight: 600;
}
.player-queue-num {
  width: 1.6rem;
  text-align: right;
  color: var(--site-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}
.player-queue-item.active .player-queue-num { color: var(--site-accent); }
.player-queue-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  padding: 0.25rem 1rem;
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
  background: var(--site-card);
  border-top: 1px solid var(--site-border);
}

.player-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: 100%;
}

.player-transport {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* "Próxima" só aparece quando há uma próxima música na fila (desktop e mobile). */
.player-root:not(.has-next) #next-btn { display: none; }

.player-btn {
  background: transparent;
  border: none;
  color: var(--site-fg);
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.1s ease;
}
.player-btn:hover { background: var(--site-accent-soft); }
.player-btn-play {
  background: var(--site-accent);
  color: #fff;
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}
.player-btn-play:hover {
  background: var(--site-accent);
  transform: scale(1.05);
  filter: brightness(1.05);
}

.player-time {
  font-size: 0.72rem;
  color: var(--site-muted);
  font-variant-numeric: tabular-nums;
  min-width: 2.4rem;
  text-align: center;
  flex-shrink: 0;
}

.player-progress-wrap {
  flex: 1;
  position: relative;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-progress-track {
  position: absolute;
  inset: 0;
  margin: auto 0;
  height: 2px;
  background: var(--site-border);
  border-radius: 1px;
  pointer-events: none;
}

.player-progress-fill {
  height: 5px;
  background: var(--site-accent);
  border-radius: 3px;
  width: 0%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: width 0.1s linear;
}

.player-progress-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}
.player-progress-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0; height: 0;
  background: transparent;
  border: none;
}
.player-progress-input::-moz-range-thumb {
  width: 0; height: 0;
  background: transparent;
  border: none;
}
.player-progress-wrap:hover .player-progress-fill { background: color-mix(in srgb, var(--site-accent) 88%, white); }

.player-autoplay {
  flex-shrink: 0;
  padding-left: 2.2em !important;
  font-size: 0.75rem;
}
.player-autoplay.hidden { display: none; }
.player-autoplay .form-check-input { margin-left: -2.2em; }

.player-volume {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--site-muted);
  flex-shrink: 0;
  font-size: 0.8rem;
}

.player-volume-wrap {
  position: relative;
  width: 90px;
  height: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.player-volume-track {
  position: absolute;
  inset: 0;
  margin: auto 0;
  height: 2px;
  background: var(--site-border);
  border-radius: 1px;
  pointer-events: none;
}

.player-volume-fill {
  height: 5px;
  background: var(--site-accent);
  border-radius: 3px;
  width: 70%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: width 0.1s linear;
}

.player-volume-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
}
.player-volume-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 0; height: 0;
  background: transparent;
  border: none;
}
.player-volume-input::-moz-range-thumb {
  width: 0; height: 0;
  background: transparent;
  border: none;
}
.player-volume-wrap:hover .player-volume-fill { background: color-mix(in srgb, var(--site-accent) 88%, white); }

@media (max-width: 575.98px) {
  .player-volume { display: none; }
  .player-autoplay { display: none; }
}

#player-audio { display: none; }

#instrumental-btn {
  width: auto;
  min-width: 36px;
  padding: 0 0.55rem;
  gap: 0.3rem;
}
#instrumental-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#instrumental-btn.active {
  background: var(--site-accent-soft);
  color: var(--site-accent);
  border-color: var(--site-accent);
}

.player-pitch {
  user-select: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.player-pitch-toggle { position: relative; }
.player-pitch-toggle.is-active { color: var(--site-accent); }
.player-pitch.is-open .player-pitch-toggle { background: var(--site-accent-soft); }
.player-pitch-badge {
  position: absolute;
  top: -3px; right: -5px;
  min-width: 15px; height: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--site-accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.player-pitch-badge[hidden] { display: none; }

/* Painel que abre a partir do botãozinho de tom */
.player-pitch-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 5;
  white-space: nowrap;
}
.player-pitch-panel[hidden] { display: none; }
.player-pitch-input {
  appearance: none;
  height: 4px;
  background: rgba(127, 127, 127, 0.25);
  border-radius: 2px;
  outline: none;
}
.player-pitch-input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--site-accent);
  cursor: pointer;
}
.player-pitch-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--site-accent);
  border: none;
  cursor: pointer;
}

@media (max-width: 720px) {
  .player-pitch { flex: 0 0 auto; }
}

.player-btn-rec {
  background: transparent;
  color: #e53935;
  border: 1px solid color-mix(in srgb, #e53935 50%, transparent);
}
.player-btn-rec:hover { background: color-mix(in srgb, #e53935 12%, transparent); }
.player-btn-rec.recording {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
  animation: rec-pulse 1.4s ease-in-out infinite;
}
@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0); }
}

/* ---------- Recording dock (sidebar) ---------- */
.rec-overlay {
  position: fixed;
  top: 80px;
  right: 1rem;
  width: 320px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 160px);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  color: #fff;
}
.rec-overlay-box {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  gap: 0.75rem;
  background: rgba(12, 14, 22, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
.rec-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}
.rec-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e53935;
  animation: rec-pulse 1.4s ease-in-out infinite;
}
.rec-overlay-grid {
  flex: 1;
  display: grid;
  gap: 0.5rem;
  min-height: 0;
  grid-template-columns: 1fr;
  overflow-y: auto;
}
.rec-stop-btn {
  flex-shrink: 0;
}
.rec-preview-tile {
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.rec-preview-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rec-preview-label {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  right: 0.4rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-overlay-status { color: #fff; font-size: 0.85rem; min-height: 1em; }

/* While recording, hide the queue (shares the right column) */
.player-root.is-recording .player-queue { display: none; }

@media (max-width: 768px) {
  .rec-overlay {
    top: auto;
    bottom: 90px;
    right: 0.5rem;
    left: auto;
    width: 150px;
    max-width: 45vw;
    max-height: 50vh;
    gap: 0.4rem;
  }
  .rec-overlay-box {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  .rec-overlay-grid {
    grid-template-columns: 1fr;
  }
  .rec-stop-btn {
    padding: 0.2rem 0.6rem;
    font-size: 0.78rem;
  }
}

/* ---------- Dedicated recording page ---------- */
/* Sem fila lateral: a letra ocupa a largura toda e fica centralizada. */
.rec-page .player-stage { position: relative; grid-template-columns: 1fr; }

/* Preview da câmera = frame vertical 9:16 centralizado, imitando o corte final
   do estúdio (1080x1920). object-fit: cover replica o crop=increase do compile. */
.rec-cam-strip {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  z-index: 3;
}
.rec-cam-strip .rec-preview-tile {
  flex: 1;
  width: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}
/* Espelha o preview da câmera (self-view); o arquivo gravado fica normal. */
.rec-cam-strip .rec-preview-tile video { object-fit: cover; transform: scaleX(-1); }

/* Música em vídeo (mp4 com letra embutida): o vídeo é a referência em tela
   cheia e a câmera vira um quadradinho no canto pra a pessoa se ver. */
.rec-page.video-mode .rec-cam-strip {
  position: fixed;
  inset: auto 1rem 5.5rem auto;
  margin: 0;
  height: auto;
  width: 26vw;
  max-width: 170px;
  aspect-ratio: 9 / 16;
  z-index: 8;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Com a câmera ativa (preview ou gravando), ela é o foco: apaga os holofotes e
   joga a letra sobreposta no rodapé do frame (karaokê), perto do resultado. */
.rec-page.cam-active .player-lights { opacity: 0.12; }
.rec-page.cam-active .player-lyrics-wrap {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: calc(100% - 2rem);
  align-items: flex-end;
  z-index: 4;
  pointer-events: none;
}
.rec-page.cam-active .player-lyrics {
  padding: 3rem 1rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 25%, transparent);
  border-radius: 0 0 16px 16px;
}
.rec-page.cam-active .player-lyric.current { font-size: clamp(1.4rem, 4.5vw, 2.6rem); margin: 0.6rem 0; }
.rec-page.cam-active .player-lyric.next { font-size: clamp(1rem, 3vw, 1.5rem); margin: 0.3rem 0; }

.rec-controls { justify-content: center; }
.rec-controls-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
}
.rec-controls-inner .rec-indicator { color: var(--site-fg); }

.rec-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: #e53935;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.2s ease, opacity 0.2s ease;
}
.rec-main-btn:hover:not(:disabled) { transform: translateY(-1px); }
.rec-main-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.rec-main-btn-dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: border-radius 0.2s ease; }
.rec-main-btn.recording { background: #2a2d3a; animation: rec-pulse 1.4s ease-in-out infinite; }
.rec-main-btn.recording .rec-main-btn-dot { border-radius: 2px; background: #e53935; }

.rec-config-btn { border-radius: 999px; }
.rec-status { color: var(--site-fg); opacity: 0.8; font-size: 0.85rem; min-height: 1em; flex-basis: 100%; text-align: center; }

/* Volume da trilha na gravação: visível também no celular (onde a trilha soa
   mais baixa por causa do ducking do sistema durante a captura do mic). */
.rec-page .rec-volume { display: flex; }

/* Linhas do modal de dispositivos (label flex com checkbox + preview) */
.rec-page .settings-device-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  /* No celular o frame 9:16 já cabe na altura; encosta nas bordas. */
  .rec-cam-strip,
  .rec-page.cam-active .player-lyrics-wrap { max-width: 100%; border-radius: 0; }
  .rec-cam-strip { border-radius: 0; }
}

@media (max-width: 767.98px) {
  /* No celular o rodapé de controles é fixed (sempre visível, mesmo com a
     barra de URL/gestos dançando) e cobre o fundo do palco — a letra,
     ancorada no fundo do frame 9:16, ficava pintada ATRÁS dele e sumia.
     Ancora o overlay logo acima do rodapé; a altura real vem do JS
     (--rec-footer-h), que acompanha status/linhas extras. */
  .rec-page.cam-active .player-lyrics-wrap {
    top: auto;
    height: auto;
    aspect-ratio: auto;
    bottom: var(--rec-footer-h, 6.5rem);
  }
  .rec-page.cam-active .player-lyrics { border-radius: 0; }
}

/* ---------- Tutorial de câmera/microfone (play e gravação) ---------- */
.tutorial-fab {
  position: fixed;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  z-index: 1030; /* abaixo dos modais do Bootstrap (1050+) */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--site-card) 80%, transparent);
  color: var(--site-fg);
  opacity: 0.75;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.tutorial-fab:hover { opacity: 1; }
/* Some junto com as barras (inatividade no player) e durante a gravação. */
.player-root.is-idle .tutorial-fab,
.player-root.is-recording .tutorial-fab {
  opacity: 0;
  pointer-events: none;
}

.tutorial-figure {
  max-width: 340px;
  margin: 0 auto 0.75rem;
  color: var(--site-fg);
}
.tutorial-figure svg { display: block; width: 100%; height: auto; }
.tutorial-pills .nav-link { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
/* Pills de primeiro nível (Liberar câmera / Ligar o som) */
.tutorial-nav-main { margin-bottom: 1rem; }
.tutorial-nav-main .nav-link { font-weight: 600; }
.tutorial-nav-main .nav-link:not(.active) { border: 1px solid var(--site-border); }
.tutorial-steps { padding-left: 1.25rem; margin-bottom: 0.5rem; }
.tutorial-steps li { margin-bottom: 0.35rem; }
.tutorial-tip {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--site-accent-soft);
  border-radius: 0.6rem;
  padding: 0.75rem;
  font-size: 0.9rem;
}
.tutorial-tip-icon { color: var(--site-accent); margin-top: 2px; }

/* ---------- Settings devices ---------- */
.settings-device-list { display: flex; flex-direction: column; gap: 0.5rem; }
.settings-device-row {
  background: var(--site-bg);
  border: 1px solid var(--site-border);
  border-radius: 0.6rem;
  padding: 0.5rem 0.75rem;
}
.settings-device-row .form-check { margin: 0; padding-left: 1.8em; }
.settings-device-preview {
  width: 80px;
  height: 60px;
  background: #000;
  border-radius: 0.35rem;
  object-fit: cover;
}

/* ---------- Recording playback ---------- */
.recording-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.recording-grid-1 { grid-template-columns: 1fr; }
.recording-video {
  width: 100%;
  background: #000;
  border-radius: 0.5rem;
  aspect-ratio: 16 / 9;
}
.recording-mixer { max-width: 480px; }

/* ---------- Profile page ---------- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 50%, #000));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-name { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.verified-badge { margin-left: .25rem; color: #1d9bf0; font-size: .85em; }
.profile-handle { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-progress { height: 6px; background: var(--site-border); border-radius: 3px; overflow: hidden; }
.profile-progress-fill { height: 100%; background: var(--site-accent); transition: width 0.3s ease; }

.profile-stat-card {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  height: 100%;
}
.profile-stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--site-muted); }
.profile-stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.profile-stat-meta { font-size: 0.7rem; color: var(--site-muted); }

.profile-toplist { list-style: none; padding: 0; margin: 0; }
.profile-toplist li { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed var(--site-border); }
.profile-toplist li:last-child { border-bottom: none; }

/* ---------- Ranking ---------- */
.table tr.highlight { background: var(--site-accent-soft) !important; }

/* ---------- Remote control ---------- */
.remote-body {
  background: var(--site-bg);
  margin: 0;
  min-height: 100vh;
}
.remote-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 1rem;
  gap: 1rem;
}
.remote-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
}
.remote-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 50%, #000));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.remote-owner-name { font-weight: 700; font-size: 1rem; }

.remote-main { display: flex; flex-direction: column; gap: 1rem; }

.remote-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 0.75rem;
}
.remote-btn {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  color: var(--site-fg);
  border-radius: 1rem;
  padding: 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 110px;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.remote-btn i { font-size: 2rem; }
.remote-btn.pressed { transform: scale(0.96); background: var(--site-accent-soft); }
.remote-btn:active { transform: scale(0.96); }

.remote-btn-play {
  background: var(--site-accent);
  color: #fff;
  border-color: var(--site-accent);
  min-height: 130px;
}
.remote-btn-play i { font-size: 2.5rem; }

.remote-btn-rec {
  background: #e53935;
  color: #fff;
  border-color: #e53935;
}
.remote-btn-rec i { color: #fff; }

.remote-secondary {
  display: flex;
  justify-content: center;
}
.remote-btn-mini {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  color: var(--site-fg);
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.remote-footer { text-align: center; padding: 0.5rem; }

/* ---------- Compositor de gravação ---------- */
.comp-segments { display: flex; flex-direction: column; gap: 0.5rem; }
.comp-segment {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.6rem;
  align-items: stretch;
  background: var(--site-bg);
  border: 1px solid var(--site-border);
  border-radius: 0.6rem;
  padding: 0.6rem 0.75rem;
}
.comp-segment-num {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.comp-segment-fields {
  display: grid;
  grid-template-columns: repeat(6, 1fr) auto;
  gap: 0.5rem;
  align-items: end;
}
.comp-field { display: flex; flex-direction: column; gap: 0.15rem; }
.comp-field label { font-size: 0.7rem; color: var(--site-muted); margin: 0; }
.comp-segment-actions { display: flex; align-items: end; }
@media (max-width: 991.98px) {
  .comp-segment-fields { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Word-by-word highlight no player ---------- */
/* Karaokê palavra-a-palavra: gradiente recortado no texto, preenchido
   da esquerda pra direita conforme --fill avança de 0% a 100% */
.player-lyric .kword {
  --fill: 0%;
  background-image: linear-gradient(90deg,
    var(--site-accent) var(--fill),
    color-mix(in srgb, var(--site-fg) 45%, transparent) var(--fill));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.player-lyric .kword.singing {
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--site-accent) 40%, transparent));
}

/* Contador de entrada (4-3-2-1) antes da primeira frase e após solos/intros */
.player-lyric.lyric-countdown {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  color: var(--site-accent);
  margin: 0.5rem 0;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--site-accent) 45%, transparent));
}
.player-lyric.lyric-countdown.pop {
  animation: lyric-countdown-pop 0.35s ease-out;
}
@keyframes lyric-countdown-pop {
  from { transform: scale(1.6); opacity: 0.2; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .player-lyric.lyric-countdown.pop { animation: none; }
}

/* Momento instrumental ({Introdução}, {Solo}, ...): rótulo + barra de progresso */
.lyric-moment {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}
.lyric-moment-label {
  font-size: 0.45em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-muted);
}
.lyric-moment-bar {
  width: min(420px, 70%);
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--site-fg) 14%, transparent);
  overflow: hidden;
}
.lyric-moment-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--site-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--site-accent) 55%, transparent);
}

/* ---------- Lyrics editor ---------- */
.editor-body {
  background: var(--site-bg);
  margin: 0;
  min-height: 100vh;
}

.editor-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100vh;
  height: 100dvh; /* barra do navegador móvel não esconde o rodapé de marcação */
  overflow: hidden;
}

/* ----- Escolha do tipo de música (áudio+letra vs vídeo MP4) ----- */
.song-chooser {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}
.song-chooser-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }
.song-chooser-subtitle { margin-bottom: 2rem; }
.song-chooser-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 320px));
  gap: 1.5rem;
}
@media (max-width: 767.98px) {
  .song-chooser-grid { grid-template-columns: 1fr; }
}
.song-chooser-card {
  display: block;
  text-decoration: none;
  color: var(--site-fg);
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.song-chooser-card:hover {
  border-color: var(--site-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  color: var(--site-fg);
}
.song-chooser-icon {
  font-size: 2.4rem;
  color: var(--site-accent);
  margin-bottom: 1rem;
}
.song-chooser-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.song-chooser-card-desc { font-size: 0.85rem; color: var(--site-muted); margin: 0; }

.editor-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--site-card);
  border-bottom: 1px solid var(--site-border);
}
.editor-title {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  color: var(--site-muted);
}
.editor-title strong { color: var(--site-fg); }

.editor-stage {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 767.98px) {
  .editor-stage { grid-template-columns: 1fr; }
}

.song-form-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem 1.25rem;
  min-height: 0;
  overflow: auto;
}
.song-form-stage .song-form-top    { grid-column: 1 / -1; grid-row: 1; }
.song-form-stage .editor-source    { grid-column: 1; grid-row: 2; min-height: 0; }
.song-form-stage .editor-timeline  { grid-column: 2; grid-row: 2; min-height: 0; }

@media (max-width: 767.98px) {
  /* Empilha os painéis com altura natural; quem rola é o stage inteiro */
  .song-form-stage { grid-template-columns: 1fr; grid-template-rows: none; }
  .song-form-stage .editor-source,
  .song-form-stage .editor-timeline { grid-column: 1; grid-row: auto; }
  .song-form-stage .editor-lines { flex: none; overflow-y: visible; }
}

.song-form-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem 1rem;
  align-items: start;
}

/* Offcanvas Configurações da música */
#songSettingsOffcanvas { width: 380px; }
#songSettingsOffcanvas .visibility-option,
#songSettingsOffcanvas .lighting-chip { font-size: .9rem; }

/* ---------- Typeahead taxonomy ---------- */
.taxonomy-combo { position: relative; }
.taxonomy-combo-list {
  position: absolute;
  z-index: 30;
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0.25rem 0;
  width: 100%;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.5rem;
  box-shadow: var(--site-shadow);
  max-height: 220px;
  overflow-y: auto;
}
.taxonomy-combo-list li {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-size: 0.92rem;
}
.taxonomy-combo-list li:hover { background: var(--site-accent-soft); color: var(--site-accent); }
.taxonomy-combo-list li.create { color: var(--site-accent); font-weight: 600; border-top: 1px solid var(--site-border); margin-top: 0.2rem; padding-top: 0.5rem; }

/* ---------- Visibility radios ---------- */
.visibility-options { display: flex; flex-direction: column; gap: 0.4rem; }

.visibility-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--site-border);
  border-radius: 0.5rem;
  cursor: pointer;
  background: var(--site-bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.visibility-option:hover { border-color: var(--site-accent-soft); }
.visibility-option:has(input:checked) {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
}
.visibility-option input { margin-top: 0.25rem; }
.visibility-option-title { font-weight: 600; font-size: 0.9rem; }
.visibility-option-desc { font-size: 0.78rem; color: var(--site-muted); }

/* ---------- Lighting preset radios ---------- */
.lighting-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.lighting-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--site-border);
  border-radius: 999px;
  cursor: pointer;
  background: var(--site-bg);
  color: var(--site-fg);
  font-size: 0.85rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.lighting-chip:hover { border-color: var(--site-accent-soft); }
.lighting-chip:has(input:checked) {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-weight: 600;
}
.lighting-chip input { display: none; }
.lighting-chip-swatches { display: inline-flex; }
.lighting-chip-swatches span {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-right: -3px;
  box-shadow: 0 0 4px currentColor;
}

.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
}
.visibility-badge-unlisted { background: color-mix(in srgb, var(--bs-warning) 18%, transparent); color: color-mix(in srgb, var(--bs-warning) 70%, var(--site-fg)); }
.visibility-badge-private { background: color-mix(in srgb, var(--bs-danger) 14%, transparent); color: color-mix(in srgb, var(--bs-danger) 70%, var(--site-fg)); }

.editor-pane {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.85rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.editor-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--site-border);
}

.editor-source textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--site-border);
  border-radius: 0.5rem;
  padding: 0.6rem;
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.editor-help {
  background: var(--site-bg);
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  margin-bottom: 0.6rem;
}
.editor-help kbd {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.78rem;
  color: var(--site-fg);
}

.editor-lines {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
}

.editor-line {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  margin-bottom: 0.25rem;
}
.editor-line:hover { background: var(--site-accent-soft); }
.editor-line.active {
  background: var(--site-accent-soft);
  border-color: var(--site-accent);
}
.editor-line.has-time .editor-line-time { color: var(--site-accent); font-weight: 600; }

.editor-line-time {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--site-muted);
  cursor: pointer;
}
.editor-line-body {
  cursor: pointer;
  font-size: 0.95rem;
}

.editor-word {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.25rem 0.25rem 0;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--site-bg);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.1;
}
.editor-word small {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.65rem;
  color: var(--site-muted);
  margin-top: 1px;
}
.editor-word.has-time { border-color: var(--site-accent); }
.editor-word.has-time small { color: var(--site-accent); }
.editor-word.active { background: var(--site-accent); color: #fff; }
.editor-word.active small { color: rgba(255,255,255,0.85); }

.editor-moment-tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px dashed var(--site-accent);
  color: var(--site-accent);
  font-size: 0.85rem;
  font-style: italic;
  cursor: pointer;
}

/* Popup de edição manual da palavra (início/fim) */
.word-edit-pop {
  position: fixed;
  z-index: 1060;
  width: 300px;
  padding: 0.75rem;
  border-radius: 0.6rem;
  background: var(--site-card);
  border: 1px solid color-mix(in srgb, var(--site-fg) 18%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Preview flutuante do karaokê no editor */
.editor-preview {
  position: fixed;
  right: 1rem;
  bottom: 6.5rem;
  z-index: 1050;
  width: min(440px, calc(100vw - 2rem));
  padding: 0.6rem 1rem 0.9rem;
  border-radius: 0.75rem;
  background: var(--site-card);
  border: 1px solid color-mix(in srgb, var(--site-fg) 18%, transparent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.editor-preview .player-lyric { margin: 0.4rem 0; }
.editor-preview .player-lyric.current { font-size: 1.5rem; font-weight: 800; min-height: 1.2em; }
.editor-preview .player-lyric.next { font-size: 0.95rem; min-height: 1.2em; }
.editor-preview .player-lyric.lyric-countdown { font-size: 1.4rem; margin: 0.2rem 0; }
.editor-preview .lyric-moment-bar { height: 6px; }

.editor-controls {
  background: var(--site-card);
  border-top: 1px solid var(--site-border);
  padding: 0.75rem 1.25rem;
}
.editor-controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 900px;
  margin: 0 auto;
}
.editor-progress {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--site-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.editor-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  background: var(--site-accent);
  border-radius: 50%;
  cursor: pointer;
}

/* Linha de marcação por toque (Marcar / desfazer / ±5s) */
.editor-mark-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 900px;
  margin: 0.6rem auto 0;
}
.editor-mark-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 56px;
  font-size: 1.05rem;
  font-weight: 700;
  touch-action: none;      /* segurar não vira scroll/zoom */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.editor-mark-btn small {
  font-weight: 400;
  font-size: 0.68rem;
  opacity: 0.8;
}
.editor-mark-btn:active { transform: scale(0.985); }
.editor-mini-btn {
  min-width: 56px;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* Alvos de toque maiores em telas de dedo */
@media (pointer: coarse) {
  .editor-word { padding: 0.35rem 0.55rem; }
  .editor-word small { font-size: 0.72rem; padding: 0.1rem 0; }
  .editor-line { padding: 0.6rem 0.5rem; }
}

/* Editor no celular */
@media (max-width: 767.98px) {
  .editor-topbar { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .editor-topbar .btn { padding: 0.35rem 0.6rem; }
  .editor-title { font-size: 0.85rem; }
  .song-form-stage { padding: 0.75rem; gap: 0.75rem; }
  .editor-pane { padding: 0.75rem; }
  .editor-source textarea { min-height: 9rem; }
  .editor-lines { max-height: none; }
  .editor-line { grid-template-columns: 72px 1fr auto; gap: 0.4rem; }
  .editor-line-time { font-size: 0.7rem; }
  .editor-controls { padding: 0.5rem 0.75rem; }
  .editor-controls-row { gap: 0.5rem; }
  .editor-mark-row { margin-top: 0.5rem; }
  /* No celular o preview fica no topo pra nunca cobrir o botão Marcar */
  .editor-preview {
    top: 0.5rem;
    bottom: auto;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
  .word-edit-pop { width: min(300px, calc(100vw - 24px)); }
}

/* ---------- Playlist cards & song detail ---------- */
.playlist-card {
  display: block;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  overflow: hidden;
  color: var(--site-fg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.playlist-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--site-shadow);
  color: var(--site-fg);
}
.playlist-card-cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 60%, var(--site-bg)));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  opacity: 0.9;
}
.playlist-card-body { padding: 1rem 1.25rem; }
.playlist-card-title { font-weight: 700; font-size: 1.05rem; }
.playlist-card-meta { font-size: 0.85rem; color: var(--site-muted); }

.song-item-position {
  width: 1.8rem;
  text-align: right;
  color: var(--site-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.song-item-actions { display: flex; align-items: center; gap: 0.1rem; flex-shrink: 0; }
.song-item-actions .btn:disabled { opacity: 0.3; }

.song-detail {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 1rem;
  padding: 1.5rem;
}
@media (max-width: 575.98px) {
  .song-detail { grid-template-columns: 1fr; }
}
.song-detail-cover {
  position: relative;
  width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--site-accent-soft);
}
.song-detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.song-detail-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--site-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.song-detail-play:hover { color: #fff; transform: scale(1.08); filter: brightness(1.06); }
.song-detail-play:focus-visible { outline: 3px solid color-mix(in srgb, var(--site-accent) 50%, #fff); outline-offset: 2px; }
.song-detail-cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--site-accent);
  font-size: 3rem;
  opacity: 0.4;
}

/* Selos PNG (alta qualidade / premium / top pedidas) sobrepostos à capa. */
.song-badges {
  position: absolute;
  top: .4rem; left: .4rem; z-index: 3;
  display: flex; flex-direction: column; gap: .25rem;
  pointer-events: none;
}
.song-badges .song-badge {
  display: block;
  width: auto; height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.45));
}
.song-badges-sm .song-badge { height: 30px; }
.song-badges-lg .song-badge { height: 46px; }
@media (max-width: 480px) {
  .song-badges-sm .song-badge { height: 24px; }
}

/* ---------- Estatísticas da música (página de detalhe) ---------- */
.song-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.song-stat {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  text-align: center;
}
.song-stat-icon {
  color: var(--site-accent);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.song-stat-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.song-stat-label { font-size: 0.78rem; color: var(--site-muted); margin-top: 0.15rem; }

.song-top-singers { list-style: none; counter-reset: rank; margin: 0; padding: 0; }
.song-top-singers li { counter-increment: rank; margin-bottom: 0.4rem; }
.song-top-singer {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.5rem 0.6rem; border-radius: 0.6rem;
  text-decoration: none; color: var(--site-fg);
}
.song-top-singer:hover { background: var(--site-accent-soft); color: var(--site-fg); }
.song-top-singer::before {
  content: counter(rank);
  flex-shrink: 0; width: 1.4rem; text-align: center;
  font-weight: 800; color: var(--site-muted);
}
.song-top-singer-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.song-top-singer-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-top-singer-count { font-size: 0.82rem; color: var(--site-muted); flex-shrink: 0; }

.song-recordings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.8rem;
}
.song-recording-card { text-decoration: none; color: var(--site-fg); }
.song-recording-thumb {
  aspect-ratio: 9 / 16;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.4rem;
  transition: transform 0.15s ease;
}
.song-recording-card:hover .song-recording-thumb { transform: translateY(-2px); }
.song-recording-meta { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }
.song-recording-avatar { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.song-recording-user { font-size: 0.78rem; color: var(--site-muted); min-width: 0; }

/* ---------- Pagination ---------- */
.pagination {
  --bs-pagination-color: var(--site-fg);
  --bs-pagination-bg: var(--site-card);
  --bs-pagination-border-color: var(--site-border);
  --bs-pagination-hover-color: var(--site-accent);
  --bs-pagination-hover-bg: var(--site-accent-soft);
  --bs-pagination-hover-border-color: var(--site-accent-soft);
  --bs-pagination-active-bg: var(--site-accent);
  --bs-pagination-active-border-color: var(--site-accent);
  --bs-pagination-disabled-color: var(--site-muted);
  --bs-pagination-disabled-bg: var(--site-card);
  --bs-pagination-disabled-border-color: var(--site-border);
}

/* ---------- Toast ---------- */
.app-toast-container {
  position: fixed;
  top: 5rem;
  right: 1.25rem;
  z-index: 1080;
  pointer-events: none;
}

.app-toast {
  min-width: 300px;
  max-width: 420px;
  color: #fff;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #1a1033));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.32), 0 2px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  pointer-events: auto;
  transform: translateX(20px);
  opacity: 0;
  transition: transform 240ms ease-out, opacity 240ms ease-out;
}

.app-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.app-toast::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.app-toast > .d-flex { position: relative; }

.app-toast.app-toast-alert {
  background: linear-gradient(135deg, #f0556a, color-mix(in srgb, #f0556a 50%, #2a0612));
}

.app-toast .toast-body {
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #fff;
}

.app-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  flex-shrink: 0;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.app-toast .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.7;
}
.app-toast .btn-close:hover { opacity: 1; }

@media (max-width: 540px) {
  .app-toast-container { left: 1rem; right: 1rem; top: 4.5rem; }
  .app-toast { min-width: 0; max-width: none; }
}

/* ---------- Box layout (dark) — corrige .text-muted herdado do Bootstrap light ---------- */
.box-landing-body .text-muted { color: rgba(255,255,255,.65) !important; }
.box-landing-body .manage-empty { color: rgba(255,255,255,.7); }

/* ---------- Auth pages (login / signup / password) ---------- */
.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100vh - 88px);
  background: var(--site-bg);
}
@media (max-width: 991.98px) {
  .auth-page { grid-template-columns: 1fr; }
}

.auth-visual {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg,
      var(--site-accent) 0%,
      color-mix(in srgb, var(--site-accent) 55%, #000) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3.5rem;
  isolation: isolate;
}
.auth-visual::before,
.auth-visual::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .55; z-index: -1;
}
.auth-visual::before {
  width: 380px; height: 380px;
  background: color-mix(in srgb, var(--site-accent) 50%, #ff4fb6);
  top: -10%; left: -10%;
  animation: auth-blob-a 14s ease-in-out infinite alternate;
}
.auth-visual::after {
  width: 320px; height: 320px;
  background: color-mix(in srgb, var(--site-accent) 50%, #4fbcff);
  bottom: -15%; right: -15%;
  animation: auth-blob-b 16s ease-in-out infinite alternate;
}
@keyframes auth-blob-a {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 60px) scale(1.18); }
}
@keyframes auth-blob-b {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, -40px) scale(1.22); }
}

.auth-shapes { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.auth-shapes span {
  position: absolute; display: block; border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  animation: auth-float 22s linear infinite;
}
.auth-shapes span:nth-child(1) { width: 80px;  height: 80px;  left: 10%; top: 18%; animation-delay:   0s; animation-duration: 22s; }
.auth-shapes span:nth-child(2) { width: 40px;  height: 40px;  left: 70%; top: 12%; animation-delay:  -4s; animation-duration: 16s; }
.auth-shapes span:nth-child(3) { width: 120px; height: 120px; left: 18%; top: 62%; animation-delay:  -8s; animation-duration: 26s; }
.auth-shapes span:nth-child(4) { width: 56px;  height: 56px;  left: 75%; top: 65%; animation-delay: -12s; animation-duration: 20s; }
.auth-shapes span:nth-child(5) { width: 28px;  height: 28px;  left: 50%; top: 38%; animation-delay:  -2s; animation-duration: 14s; }
@keyframes auth-float {
  0%   { transform: translate(0, 0) rotate(0deg); }
  50%  { transform: translate(40px, -30px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

.auth-visual-content { position: relative; z-index: 1; max-width: 480px; }
.auth-visual-logo {
  height: 56px; margin-bottom: 2rem;
  filter: brightness(0) invert(1); opacity: .92;
  animation: auth-fade-up 800ms ease 80ms both;
}
.auth-visual-title {
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 900; letter-spacing: -.025em; line-height: 1.05;
  margin-bottom: 1.25rem;
  animation: auth-fade-up 800ms ease 160ms both;
}
.auth-visual-tagline {
  font-size: 1.05rem; line-height: 1.65; opacity: .85;
  margin-bottom: 2.5rem;
  animation: auth-fade-up 800ms ease 240ms both;
}
.auth-feature-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 1rem;
  animation: auth-fade-up 800ms ease 320ms both;
}
.auth-feature-list li { display: flex; align-items: flex-start; gap: .85rem; font-size: .95rem; line-height: 1.5; }
.auth-feature-icon {
  flex-shrink: 0; width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
  backdrop-filter: blur(6px);
}

@media (max-width: 991.98px) {
  .auth-visual { padding: 2.25rem 1.5rem; min-height: 280px; }
  .auth-visual-logo { height: 44px; margin-bottom: 1rem; }
  .auth-visual-title { font-size: 1.6rem; margin-bottom: .5rem; }
  .auth-visual-tagline { font-size: .9rem; margin-bottom: 0; }
  .auth-feature-list { display: none; }
}

/* Right panel */
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2rem; background: var(--site-bg);
}
.auth-form-card {
  width: 100%; max-width: 420px;
  animation: auth-fade-up 600ms ease 100ms both;
}
@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-eyebrow {
  text-transform: uppercase; font-size: .72rem; font-weight: 700;
  letter-spacing: .25em; color: var(--site-accent);
  margin-bottom: .75rem;
}
.auth-title {
  font-size: 2.05rem; font-weight: 800; letter-spacing: -.025em;
  margin-bottom: .4rem; color: var(--site-fg);
}
.auth-subtitle { font-size: .98rem; color: var(--site-muted); margin-bottom: 1.75rem; }

/* Floating-label inputs */
.auth-field { position: relative; margin-bottom: 1rem; }
.auth-field input {
  width: 100%; height: 58px;
  padding: 1.55rem 1rem .45rem;
  border: 1px solid var(--site-border);
  border-radius: 12px;
  background: var(--site-card);
  color: var(--site-fg);
  font-size: 1rem; font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-field input:hover { border-color: color-mix(in srgb, var(--site-accent) 40%, var(--site-border)); }
.auth-field input:focus {
  border-color: var(--site-accent);
  box-shadow: 0 0 0 4px var(--site-accent-soft);
}
.auth-field input::placeholder { color: transparent; }
.auth-field label {
  position: absolute; left: 1rem; top: 1.05rem;
  color: var(--site-muted);
  font-size: 1rem; font-weight: 500;
  pointer-events: none;
  transition: top .18s ease, font-size .18s ease, color .18s ease, font-weight .18s ease;
  background: transparent; padding: 0; margin: 0;
}
.auth-field input:focus + label,
.auth-field input:not(:placeholder-shown) + label {
  top: .42rem;
  font-size: .68rem; font-weight: 700;
  color: var(--site-accent);
  letter-spacing: .08em; text-transform: uppercase;
}

.auth-submit {
  width: 100%; height: 56px;
  padding: 0 1.5rem; border: 0; border-radius: 12px;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 60%, #ff4fb6));
  color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .01em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--site-accent) 35%, transparent);
  position: relative; overflow: hidden;
  margin-top: .25rem;
}
.auth-submit::before {
  content: ""; position: absolute; top: 0; left: -75%;
  width: 50%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px color-mix(in srgb, var(--site-accent) 50%, transparent);
  filter: saturate(1.1) brightness(1.05);
}
.auth-submit:hover::before { animation: auth-shine 700ms ease; }
.auth-submit:active { transform: translateY(0); filter: saturate(1); }
.auth-submit i { transition: transform .2s ease; }
.auth-submit:hover i { transform: translateX(4px); }
@keyframes auth-shine {
  from { left: -75%; }
  to   { left: 130%; }
}

.auth-error,
.auth-success {
  padding: .85rem 1rem; border-radius: 10px;
  font-size: .9rem; line-height: 1.45;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .6rem;
}
.auth-error {
  background: color-mix(in srgb, #dc3545 14%, var(--site-bg));
  border: 1px solid color-mix(in srgb, #dc3545 38%, transparent);
  color: #dc3545;
  animation: auth-shake 350ms ease;
}
.auth-error ul { margin: 0; padding-left: 1.1rem; }
.auth-success {
  background: color-mix(in srgb, #198754 14%, var(--site-bg));
  border: 1px solid color-mix(in srgb, #198754 38%, transparent);
  color: #198754;
}
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-helper {
  display: flex; justify-content: flex-end;
  margin: -.25rem 0 1.1rem;
  font-size: .85rem;
}
.auth-helper a { color: var(--site-muted); text-decoration: none; }
.auth-helper a:hover { color: var(--site-accent); }

.auth-meta {
  text-align: center; margin-top: 1.5rem;
  font-size: .92rem; color: var(--site-muted);
}
.auth-meta a { color: var(--site-accent); text-decoration: none; font-weight: 600; }
.auth-meta a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .auth-visual::before,
  .auth-visual::after,
  .auth-shapes span,
  .auth-visual-logo,
  .auth-visual-title,
  .auth-visual-tagline,
  .auth-feature-list,
  .auth-form-card,
  .auth-error { animation: none !important; }
}

/* ========== Library (Spotify-like) ========== */
.library-hero {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--site-accent) 14%, var(--site-bg)) 0%, var(--site-bg) 100%);
  border-bottom: 1px solid var(--site-border);
  overflow: hidden;
}
.library-hero-glow {
  position: absolute;
  inset: -30% auto auto -10%;
  width: 80%; height: 120%;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--site-accent) 30%, transparent), transparent 70%),
    radial-gradient(closest-side, color-mix(in srgb, #ff4fb6 18%, transparent), transparent 70%);
  filter: blur(40px);
  opacity: .7;
  pointer-events: none;
}
.library-title {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 .5rem;
}
.library-lede {
  color: var(--site-muted);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 0;
}

/* Random button (hero CTA) */
.btn-random {
  --rnd-from: var(--site-accent);
  --rnd-to: color-mix(in srgb, var(--site-accent) 55%, #ff4fb6);
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1.6rem .9rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rnd-from), var(--rnd-to));
  color: #fff;
  font-weight: 700;
  text-align: left;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--site-accent) 35%, transparent);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .22s ease, filter .22s ease;
}
.btn-random:hover {
  transform: translateY(-2px) scale(1.02);
  filter: saturate(1.1);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--site-accent) 50%, transparent);
}
.btn-random:active { transform: translateY(0) scale(0.98); }
.btn-random-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-size: 1.2rem;
  transition: transform .4s ease;
}
.btn-random:hover .btn-random-icon { transform: rotate(180deg); }
.btn-random.is-loading .btn-random-icon { animation: dice-roll .55s linear infinite; }
@keyframes dice-roll {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}
.btn-random-text { display: flex; flex-direction: column; line-height: 1.15; }
.btn-random-label { font-size: 1.1rem; }
.btn-random-hint { font-size: .78rem; opacity: .85; font-weight: 500; }

/* Filters */
.library-filters { margin-top: 2rem; max-width: 720px; }
.library-search {
  position: relative;
  display: flex; align-items: center;
}
.library-search-input {
  width: 100%;
  padding: .95rem 3.6rem .95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--site-border);
  background: var(--site-card);
  color: var(--site-fg);
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  transition: border-color .15s ease, box-shadow .2s ease;
}
.library-search-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--site-accent) 50%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-accent) 18%, transparent);
}
.library-search-btn {
  position: absolute;
  right: .35rem;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--site-accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.library-search-btn:hover { filter: brightness(1.08); }
.library-search-btn:active { transform: scale(.94); }
.library-search-clear {
  position: absolute;
  right: 3.4rem;
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--site-border);
  color: var(--site-muted);
  text-decoration: none;
  font-size: .8rem;
}
.library-search-clear:hover { background: var(--site-accent-soft); color: var(--site-accent); }

.library-active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  margin-top: 1rem;
}
.library-filter-chip {
  display: inline-flex; align-items: center;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  color: var(--site-fg);
  text-decoration: none;
  font-size: .85rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.library-filter-chip:hover { border-color: var(--site-accent); color: var(--site-accent); }
.library-filter-chip.active {
  background: var(--site-accent);
  border-color: var(--site-accent);
  color: #fff;
}
.library-filter-chip.active:hover { background: color-mix(in srgb, var(--site-accent) 88%, #000); color: #fff; }
.library-filter-clear {
  font-size: .8rem;
  color: var(--site-muted);
  text-decoration: none;
  margin-left: .35rem;
}
.library-filter-clear:hover { color: var(--site-accent); }

/* Banner de destaque pra sugestão de música (/cantar) */
.suggest-banner-section { padding: 0.75rem 0 1rem; }
.suggest-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--site-accent) 35%, transparent);
  background:
    radial-gradient(120% 200% at 0% 0%, color-mix(in srgb, var(--site-accent) 20%, transparent), transparent 55%),
    var(--site-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.suggest-banner-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--site-accent-soft);
  color: var(--site-accent);
  font-size: 1.5rem;
}
.suggest-banner-text { flex: 1; min-width: 0; }
.suggest-banner-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 0.25rem; }
.suggest-banner-subtitle { margin: 0; color: var(--site-muted); font-size: 0.95rem; }
.suggest-banner-cta { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 767.98px) {
  .suggest-banner { flex-direction: column; text-align: center; padding: 1.5rem 1.25rem; gap: 0.9rem; }
  .suggest-banner-cta { width: 100%; }
}

.library-genre-section { padding: .5rem 0 1.5rem; }
.library-genre-bar {
  display: flex; gap: 1rem;
  overflow-x: auto; padding-bottom: .5rem;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.library-genre-bar::-webkit-scrollbar { height: 6px; }
.library-genre-bar::-webkit-scrollbar-thumb { background: var(--site-border); border-radius: 999px; }
.library-genre-tile {
  flex: 0 0 auto; width: 84px;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  text-decoration: none; color: var(--site-fg);
  /* iOS: sem double-tap-zoom no círculo — o tap vira click direto */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.library-genre-photo {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--site-accent-soft); color: var(--site-accent);
  border: 2px solid transparent;
  font-size: 1.4rem;
  transition: border-color .15s ease, transform .15s ease;
}
.library-genre-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Hover-lift só com mouse: no iOS o :hover no toque pode engolir o click */
@media (hover: hover) {
  .library-genre-tile:hover .library-genre-photo { transform: translateY(-2px); }
}
.library-genre-tile.active .library-genre-photo { border-color: var(--site-accent); }
.library-genre-name {
  font-size: .8rem; font-weight: 600; text-align: center;
  white-space: nowrap; max-width: 84px; overflow: hidden; text-overflow: ellipsis;
  color: var(--site-muted);
}
.library-genre-tile.active .library-genre-name { color: var(--site-accent); }

.library-back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 1.25rem;
  padding: .6rem 1.1rem;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--site-border);
  background: var(--site-card);
  color: var(--site-fg);
  font-size: .9rem; font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.library-back-link:hover {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
  color: var(--site-accent);
}

.library-az-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem;
  margin: 1.25rem 0 1.5rem;
}
.library-az-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; min-height: 48px; padding: .5rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--site-border);
  background: var(--site-card);
  color: var(--site-fg);
  text-decoration: none;
  font-size: 1rem; font-weight: 700;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.library-az-chip:hover { border-color: var(--site-accent); color: var(--site-accent); }
.library-az-chip.active { background: var(--site-accent); border-color: var(--site-accent); color: #fff; }
.library-az-chip.disabled { opacity: .35; pointer-events: none; }

.library-artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.25rem;
}
.library-artist-card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 1rem .5rem;
  border-radius: 14px;
  text-decoration: none;
  color: var(--site-fg);
  transition: background .15s ease;
}
.library-artist-card:hover { background: var(--site-accent-soft); }
.library-artist-photo {
  width: 96px; height: 96px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.library-artist-photo img { width: 100%; height: 100%; object-fit: cover; }
.library-artist-initial { font-size: 2.2rem; font-weight: 800; }
.library-artist-name {
  font-size: .9rem; font-weight: 700; text-align: center;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.library-artist-count { font-size: .75rem; color: var(--site-muted); }

.library-infinite-sentinel {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px; margin-top: 1.5rem;
  color: var(--site-muted); font-size: 1.4rem;
}
.library-infinite-spinner { opacity: 0; transition: opacity .15s ease; }
.library-infinite-sentinel.is-loading .library-infinite-spinner { opacity: 1; }

.icon-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.icon-option {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: 1px solid var(--site-border); border-radius: 10px;
  cursor: pointer; font-size: 1.2rem; color: var(--site-fg);
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option:hover { border-color: var(--site-accent-soft); }
.icon-option:has(input:checked) {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
  color: var(--site-accent);
}

/* Spotlight (random pick reveal) */
.library-spotlight { background: var(--site-bg); }
.library-spotlight-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--site-accent) 35%, transparent), transparent 60%),
    var(--site-card);
  border: 1px solid color-mix(in srgb, var(--site-accent) 25%, var(--site-border));
  box-shadow: var(--site-shadow);
  animation: spotlight-in .35s ease;
}
@keyframes spotlight-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.library-spotlight-card.is-rolling .library-spotlight-cover-img {
  animation: spotlight-roll .5s ease;
}
@keyframes spotlight-roll {
  0% { transform: scale(.92) rotate(-3deg); filter: blur(2px); }
  100% { transform: scale(1) rotate(0); filter: blur(0); }
}
.library-spotlight-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--site-accent) 35%, transparent);
}
.library-spotlight-cover-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.library-spotlight-cover-img.no-image::after {
  content: '\f001';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: 3.5rem;
}
.library-spotlight-equalizer {
  position: absolute;
  left: 1rem; bottom: 1rem;
  display: flex; align-items: flex-end; gap: 3px;
  height: 22px;
}
.library-spotlight-equalizer span {
  display: inline-block;
  width: 4px; border-radius: 2px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 0 8px rgba(255,255,255,.6);
  animation: equalize 1.1s ease-in-out infinite;
}
.library-spotlight-equalizer span:nth-child(1) { animation-delay: 0s;   height: 60%; }
.library-spotlight-equalizer span:nth-child(2) { animation-delay: .2s;  height: 90%; }
.library-spotlight-equalizer span:nth-child(3) { animation-delay: .35s; height: 45%; }
.library-spotlight-equalizer span:nth-child(4) { animation-delay: .5s;  height: 75%; }
@keyframes equalize {
  0%, 100% { transform: scaleY(.55); }
  50% { transform: scaleY(1.2); }
}

.library-spotlight-eyebrow {
  display: inline-flex; align-items: center;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--site-accent);
  margin-bottom: .35rem;
}
.library-spotlight-title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 .25rem;
}
.library-spotlight-artist {
  font-size: 1.05rem;
  color: var(--site-muted);
  margin-bottom: .35rem;
}
.library-spotlight-meta {
  display: flex; gap: 1rem; align-items: center;
  font-size: .85rem; color: var(--site-muted);
  margin-bottom: 1rem;
  min-height: 1.25rem;
}
.library-spotlight-verified { color: #22c55e; font-weight: 600; }
.library-spotlight-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

@media (max-width: 640px) {
  .library-spotlight-card { grid-template-columns: 1fr; text-align: center; }
  .library-spotlight-cover { max-width: 220px; margin: 0 auto; }
  .library-spotlight-meta { justify-content: center; }
  .library-spotlight-actions { justify-content: center; }
}

/* Section heads */
.library-section { padding: 2.25rem 0; }
.library-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.25rem;
}
.library-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0;
}
.library-section-link a {
  font-size: .9rem;
  color: var(--site-muted);
  text-decoration: none;
  font-weight: 600;
}
.library-section-link a:hover { color: var(--site-accent); }

/* Artists row */
/* Animated 3D artist coverflow */
.artist-coverflow {
  position: relative;
  perspective: 1400px;
  margin-top: 1.5rem;
  padding: 1.25rem 0 1rem;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.artist-coverflow.is-dragging { cursor: grabbing; }
.artist-coverflow.is-dragging .artist-coverflow-card { transition: none; }
.artist-coverflow.is-dragging .artist-coverflow-card img { pointer-events: none; }
.artist-coverflow-stage {
  position: relative;
  height: 290px;
  transform-style: preserve-3d;
}
.artist-coverflow-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: 210px;
  text-decoration: none;
  color: inherit;
  transform-origin: center center;
  transform: translateX(-50%);
  transition: transform .6s cubic-bezier(.22,.68,.21,1.01), opacity .5s ease;
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.artist-coverflow-photo {
  position: relative;
  width: 210px; height: 210px;
  border-radius: 1.5rem;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 50%, #ff4fb6));
  box-shadow:
    0 26px 50px rgba(0,0,0,.45),
    0 0 0 1px color-mix(in srgb, #fff 10%, transparent) inset,
    0 1px 0 color-mix(in srgb, #fff 35%, transparent) inset;
  transition: box-shadow .5s ease;
}
.artist-coverflow-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.artist-coverflow-initial {
  color: #fff;
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.artist-coverflow-gloss {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,
    rgba(255,255,255,.42) 0%,
    rgba(255,255,255,.08) 28%,
    rgba(255,255,255,0) 46%);
}
.artist-coverflow-card.is-active .artist-coverflow-photo {
  box-shadow:
    0 36px 70px color-mix(in srgb, var(--site-accent) 40%, rgba(0,0,0,.5)),
    0 0 0 1px color-mix(in srgb, #fff 14%, transparent) inset,
    0 1px 0 color-mix(in srgb, #fff 45%, transparent) inset;
}
.artist-coverflow-label {
  text-align: center;
  margin-top: .9rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.artist-coverflow-card.is-active .artist-coverflow-label {
  opacity: 1;
  transform: none;
}
.artist-coverflow-name {
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}
.artist-coverflow-count { font-size: .82rem; color: var(--site-muted); margin-top: .1rem; }
.artist-coverflow-nav {
  position: absolute;
  top: 105px;
  transform: translateY(-50%);
  z-index: 200;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--site-card) 82%, transparent);
  color: var(--site-fg);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.artist-coverflow-nav:hover {
  transform: translateY(-50%) scale(1.08);
  background: var(--site-accent);
  color: #fff;
  border-color: var(--site-accent);
}
.artist-coverflow-nav.prev { left: 1.5rem; }
.artist-coverflow-nav.next { right: 1.5rem; }
@media (max-width: 575.98px) {
  .artist-coverflow-stage { height: 230px; }
  .artist-coverflow-card,
  .artist-coverflow-photo { width: 160px; }
  .artist-coverflow-photo { height: 160px; }
  .artist-coverflow-initial { font-size: 3.4rem; }
  .artist-coverflow-name { max-width: 160px; }
  .artist-coverflow-nav { top: 80px; width: 40px; height: 40px; }
  .artist-coverflow-nav.prev { left: .5rem; }
  .artist-coverflow-nav.next { right: .5rem; }
}

/* Styles grid */
.library-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.library-style-card {
  position: relative;
  padding: 1.25rem;
  height: 110px;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  letter-spacing: -.01em;
  background:
    linear-gradient(135deg, var(--style-color), color-mix(in srgb, var(--style-color) 55%, #111));
  transition: transform .18s ease, box-shadow .2s ease;
}
.library-style-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--style-color) 40%, transparent);
  color: #fff;
}
.library-style-name {
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}
.library-style-icon {
  position: absolute;
  right: -.5rem; bottom: -1rem;
  font-size: 4.5rem;
  opacity: .22;
  transform: rotate(20deg);
}

/* Song grid */
.library-song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
}
.library-song-card {
  display: block;
  position: relative; /* âncora do menu ⋮ (fica fora da capa, que corta overflow) */
  padding: .85rem;
  border-radius: .9rem;
  background: var(--site-card);
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.library-song-card:hover {
  background: color-mix(in srgb, var(--site-accent-soft) 80%, var(--site-card));
  border-color: color-mix(in srgb, var(--site-accent) 25%, transparent);
  color: inherit;
  transform: translateY(-2px);
}
.library-song-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: .65rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  margin-bottom: .75rem;
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.library-song-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.library-song-cover-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 2.2rem;
}
.library-song-play {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem .5rem;
  background: var(--site-accent);
  color: #fff;
  font-size: .9rem; font-weight: 700;
  white-space: nowrap;
  clip-path: inset(0 0 0 100%);
  transition: clip-path .3s ease;
}
.library-song-card:hover .library-song-play { clip-path: inset(0 0 0 0); }
@media (hover: none) { .library-song-play { clip-path: inset(0 0 0 0); } }

/* Coluna de ações no canto sup. direito: prévia, favoritar e +.
   Fica longe dos selos (canto sup. esquerdo) e some/aparece com a capa. */
.library-song-actions {
  position: absolute;
  top: .5rem; right: .5rem; z-index: 3;
  display: flex; flex-direction: column; gap: .3rem;
}
/* Com 4 ações empilhadas (prévia, compartilhar, favorito e +), botões de 40px
   estouram a capa quadrada nos cards mínimos de 170px; 34px cabem com folga. */
.library-song-actions .library-song-preview,
.library-song-actions .library-song-playlist,
.library-song-actions .library-song-share,
.library-song-actions .favorite-btn {
  width: 34px; height: 34px; font-size: .85rem;
}

.library-song-preview {
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff;
  cursor: pointer; font-size: .95rem;
  backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.library-song-card:hover .library-song-preview,
.library-song-preview.is-loading,
.library-song-preview.is-playing { opacity: 1; transform: none; }
.library-song-preview:hover,
.library-song-preview.is-playing { background: var(--site-accent); }
@media (hover: none) {
  .library-song-preview { opacity: 1; transform: none; }
}

/* Botões "+ adicionar à playlist" e compartilhar (empilhados na coluna de ações) */
.library-song-playlist,
.library-song-share {
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff;
  border: none; cursor: pointer; font-size: .95rem;
  backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.library-song-card:hover .library-song-playlist,
.library-song-card:hover .library-song-share { opacity: 1; transform: none; }
.library-song-playlist:hover,
.library-song-share:hover { background: var(--site-accent); }
@media (hover: none) {
  .library-song-playlist,
  .library-song-share { opacity: 1; transform: none; }
}

/* Menu ⋮ do card: agrupa compartilhar / playlist / baixar offline
   (prévia e favorito continuam soltos na coluna de ações) */
.library-song-more {
  z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); color: #fff;
  cursor: pointer; font-size: .85rem;
  backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.library-song-card:hover .library-song-more { opacity: 1; transform: none; }
.library-song-more:hover { background: var(--site-accent); }
@media (hover: none) {
  .library-song-more { opacity: 1; transform: none; }
}

.library-song-menu {
  position: absolute;
  top: 1.35rem; right: 3.6rem; z-index: 5;
  display: flex; flex-direction: column;
  min-width: 12.5rem;
  padding: .35rem;
  border-radius: .75rem;
  background: rgba(12, 13, 18, .96);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 32px rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.library-song-menu[hidden] { display: none; }
.library-song-menu-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem;
  border-radius: .5rem;
  color: #fff; font-size: .85rem; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.library-song-menu-item:hover { background: var(--site-accent); }
.library-song-menu-item i { width: 1rem; text-align: center; opacity: .8; }

/* Toast leve para feedback de "adicionada à playlist" */
.playlist-toast {
  position: fixed;
  left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 1rem);
  z-index: 3000;
  max-width: min(90vw, 24rem);
  padding: .75rem 1.1rem;
  border-radius: 999px;
  background: var(--site-accent);
  color: #fff;
  font-weight: 600; font-size: .9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.playlist-toast.show { opacity: 1; transform: translate(-50%, 0); }

#addToPlaylistModal [data-playlist-add].is-added { color: var(--bs-success, #28a745); opacity: .85; }

/* ----- Favorite button ----- */
.favorite-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff;
  cursor: pointer; font-size: .95rem;
  border: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, opacity .15s ease;
}
.favorite-btn:hover { background: rgba(0,0,0,.7); }
.favorite-btn.is-favorited { color: #ff3b6b; }
.favorite-btn.is-pulsing i { animation: fav-pop .35s ease; }
@keyframes fav-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Favoritar dentro da coluna de ações do card (canto sup. direito) */
.favorite-btn--card {
  z-index: 3;
  backdrop-filter: blur(2px);
  opacity: 0; transform: translateY(-4px);
}
.library-song-card:hover .favorite-btn--card,
.favorite-btn--card.is-favorited { opacity: 1; transform: none; }
@media (hover: none) {
  .favorite-btn--card { opacity: 1; transform: none; }
}

/* Player topbar variant */
.favorite-btn--player { background: rgba(255,255,255,.08); }
.favorite-btn--player:hover { background: rgba(255,255,255,.18); }

/* Standalone variant (e.g. recording page header) */
.favorite-btn--solo {
  background: transparent;
  color: var(--site-muted);
  border: 1px solid var(--site-border, rgba(0,0,0,.15));
}
.favorite-btn--solo:hover { background: rgba(0,0,0,.05); color: #ff3b6b; }
.favorite-btn--solo.is-favorited { color: #ff3b6b; border-color: #ff3b6b; }

/* Abas "Pra você | Favoritas | Playlists" na biblioteca. */
.library-tabs {
  display: flex; gap: .9rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--site-border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.library-tabs::-webkit-scrollbar { display: none; }
.library-tab {
  flex: 0 0 auto;
  background: none; border: 0; padding: .65rem .15rem; margin-bottom: -1px;
  color: var(--site-muted); font-weight: 700; font-size: 1rem;
  border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.library-tab:hover { color: var(--site-fg); }
.library-tab.is-active { color: var(--site-fg); border-bottom-color: var(--site-accent); }
.library-tab-empty {
  text-align: center; padding: 2.75rem 1rem; color: var(--site-fg);
}
.library-tab-empty i { font-size: 1.9rem; color: var(--site-muted); margin-bottom: .65rem; display: block; }
.library-tab-empty p { margin: 0 0 .25rem; font-weight: 600; }

.library-song-title {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.library-song-title .fa-check-circle { font-size: .8em; margin-left: .25rem; }
.library-song-meta {
  display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
  margin-top: .35rem;
}
.library-song-artist-name {
  font-size: .82rem; color: var(--site-muted);
}
/* Artista: botão pequeno, só com borda na cor do site. Filtra ao clicar. */
.library-song-artist-btn {
  display: inline-block; max-width: 100%;
  padding: .12rem .55rem;
  font-size: .76rem; font-weight: 600; line-height: 1.35;
  color: var(--site-accent);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--site-accent) 55%, transparent);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s ease, border-color .15s ease;
}
.library-song-artist-btn:hover,
.library-song-artist-btn:focus-visible {
  background: var(--site-accent-soft);
  border-color: var(--site-accent);
  outline: none;
}
/* Gênero: badge clicável que filtra por estilo. */
.library-song-genre {
  display: inline-block; max-width: 100%;
  padding: .12rem .5rem;
  font-size: .72rem; font-weight: 700;
  color: var(--site-accent);
  background: var(--site-accent-soft);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: filter .15s ease;
}
.library-song-genre:hover,
.library-song-genre:focus-visible { filter: brightness(1.2); outline: none; }

/* Box-context bar on top of library */
.library-box-bar {
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1020;
}
.library-box-back {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: background .15s ease;
}
.library-box-back:hover { background: rgba(255,255,255,.2); color: inherit; }
.library-box-logo { max-height: 32px; }
.library-box-name { font-size: 1.05rem; }
.library-box-sep { opacity: .4; }
.library-box-section { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; opacity: .8; }

/* ---------- Upload drop zone (substitui input[type=file] padrão) ---------- */
.upload-drop {
  position: relative;
  display: block;
  border: 2px dashed var(--site-border);
  border-radius: 10px;
  padding: .55rem .65rem;
  background: var(--site-card);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.upload-drop:hover,
.upload-drop:focus-within,
.upload-drop.is-dragging {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
}
.upload-drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.upload-drop-empty {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--site-muted);
  pointer-events: none;
  font-size: .85rem;
  line-height: 1.2;
}
.upload-drop-icon {
  font-size: 1.15rem;
  color: var(--site-accent);
  flex-shrink: 0;
}
.upload-drop-cta strong {
  color: var(--site-fg);
  font-weight: 600;
}
.upload-drop-filled { display: none; }
.upload-drop.is-filled .upload-drop-empty { display: none; }
.upload-drop.is-filled .upload-drop-filled {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .65rem;
  row-gap: .15rem;
  align-items: center;
}
.upload-drop-filename {
  grid-column: 2;
  grid-row: 1;
  font-size: .85rem;
  color: var(--site-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-drop-thumb {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--site-bg);
}
.upload-drop-thumb-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--site-accent);
  font-size: 1.25rem;
  background: var(--site-accent-soft);
}
.upload-drop-replace {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  padding: 0;
  font-size: .8rem;
  color: var(--site-accent);
}
.upload-drop-replace:hover { text-decoration: underline; }

/* ============================================================
   Onboarding (pós-cadastro)
   ============================================================ */
.onboarding-shell {
  max-width: 960px; margin: 0 auto; padding: 2rem 1.25rem 4rem;
}
.onboarding-header { text-align: center; margin-bottom: 2rem; }
.onboarding-steps {
  display: inline-flex; align-items: center; gap: .75rem;
  margin-bottom: 1.5rem;
}
.onboarding-step {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--site-muted); font-size: .9rem; font-weight: 600;
}
.onboarding-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--site-card); border: 1px solid var(--site-border);
  font-weight: 700;
}
.onboarding-step.is-active { color: var(--site-fg); }
.onboarding-step.is-active .onboarding-step-num {
  background: var(--site-accent); border-color: var(--site-accent); color: #fff;
}
.onboarding-step.is-done { color: var(--site-accent); }
.onboarding-step.is-done .onboarding-step-num {
  background: var(--site-accent-soft); border-color: var(--site-accent); color: var(--site-accent);
}
.onboarding-step-bar {
  flex: 0 0 56px; height: 2px;
  background: var(--site-border); border-radius: 2px;
}
.onboarding-step-bar.is-done { background: var(--site-accent); }
.onboarding-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800;
  margin: 0 0 .5rem;
}
.onboarding-subtitle { color: var(--site-muted); margin: 0; }
.onboarding-flash {
  background: color-mix(in srgb, #f5b400 14%, transparent);
  border: 1px solid color-mix(in srgb, #f5b400 40%, transparent);
  color: color-mix(in srgb, #f5b400 80%, var(--site-fg));
  padding: .75rem 1rem; border-radius: 12px;
  margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: .55rem;
}
.onboarding-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.onboarding-grid.is-artists {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.onboarding-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1rem .75rem;
  background: var(--site-card);
  border: 2px solid var(--site-border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.onboarding-card:hover { transform: translateY(-2px); border-color: var(--site-accent); }
.onboarding-card.is-selected {
  border-color: var(--site-accent);
  background: var(--site-accent-soft);
}
.onboarding-card-input {
  position: absolute; opacity: 0; pointer-events: none;
}
.onboarding-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--site-accent-soft); color: var(--site-accent);
  font-size: 1.5rem; overflow: hidden;
}
.onboarding-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.onboarding-card-photo {
  width: 72px; height: 72px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--site-accent), color-mix(in srgb, var(--site-accent) 55%, #ff4fb6));
  color: #fff; overflow: hidden;
}
.onboarding-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.onboarding-card-initial { font-size: 1.7rem; font-weight: 800; }
.onboarding-card-label {
  font-size: .88rem; font-weight: 700; text-align: center;
  color: var(--site-fg);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
.onboarding-card-check {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--site-accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; opacity: 0; transform: scale(.6);
  transition: opacity .15s ease, transform .15s ease;
}
.onboarding-card.is-selected .onboarding-card-check {
  opacity: 1; transform: scale(1);
}

.onboarding-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 2rem;
  position: sticky; bottom: 0;
  background: linear-gradient(180deg, transparent, var(--site-bg) 30%);
  padding: 1.5rem 0 .5rem;
}
.onboarding-skip {
  background: none; border: none; padding: .5rem 1rem;
  color: var(--site-muted); font-weight: 600; cursor: pointer;
  text-decoration: underline;
}
.onboarding-skip:hover { color: var(--site-fg); }
.onboarding-submit {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px;
  background: var(--site-accent); color: #fff;
  border: none; font-weight: 700; font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--site-accent) 35%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.onboarding-submit:hover { transform: translateY(-1px); }

/* ---------- Lista de notificações (dropdown do topbar + página /notifications) ---------- */
.notif-item {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .6rem .9rem; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--bs-border-color, #eee);
}
.notif-item:hover { background: var(--bs-tertiary-bg, #f6f6f8); }
.notif-item.is-unread { background: rgba(111,66,193,.07); }
.notif-icon {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem;
  background: #6f42c1;
}
.notif-icon--like { background: #ff3b6b; }
.notif-icon--comment { background: #0d6efd; }
.notif-icon--follow { background: #19c37d; }
.notif-body { display: flex; flex-direction: column; }
.notif-msg { font-size: .85rem; }
.notif-time { font-size: .72rem; color: var(--bs-secondary-color, #999); }

/* ---------- Foto de perfil (custom) ---------- */
/* Aplica nos <img> de avatar (helper user_avatar): herda tamanho/forma da
   classe do avatar de letra e recorta a imagem pra preencher o círculo. */
.avatar-img { object-fit: cover; padding: 0; }
.profile-avatar-edit { display: flex; align-items: center; gap: 1rem; }

/* Foto clicável no próprio perfil (badge de câmera, estilo Instagram). */
.profile-avatar-form { line-height: 0; }
.profile-avatar-wrap { position: relative; display: inline-block; cursor: pointer; }
.profile-avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--site-accent, #6f42c1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; border: 2px solid var(--site-bg, #fff);
}
.profile-edit-btn { margin-top: .55rem; white-space: nowrap; }
/* Rótulo "Editar perfil" no desktop, "Editar" no mobile. */
.profile-btn-label-short { display: none; }
@media (max-width: 600px) {
  .profile-btn-label-full { display: none; }
  .profile-btn-label-short { display: inline; }
}

/* Abas do perfil (Vídeos / Estatísticas) */
.profile-tabs {
  display: flex; gap: .25rem; margin-top: 1.25rem;
  border-bottom: 1px solid var(--site-border, #e5e5e5);
}
.profile-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem .5rem; text-decoration: none; font-weight: 600; font-size: .9rem;
  color: var(--site-muted, #888); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.profile-tab.is-active { color: var(--site-fg, #111); border-bottom-color: var(--site-fg, #111); }
.profile-tab:hover { color: var(--site-fg, #111); }

/* Grade de vídeos (estilo Instagram, 4 por linha) */
.profile-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: .9rem;
}
.profile-grid-item {
  position: relative; display: block; aspect-ratio: 3 / 4;
  overflow: hidden; background: #000; border-radius: 8px;
}
.profile-grid-link { display: block; width: 100%; height: 100%; }
.profile-grid-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-grid-play {
  position: absolute; top: 6px; left: 7px; color: #fff; font-size: .72rem;
  opacity: .9; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

/* Rodapé com legenda + contadores sobre o thumbnail. */
.profile-grid-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 22px 9px 8px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.82) 65%);
  pointer-events: none;
}
.profile-grid-caption {
  margin: 0 0 5px; color: #fff; font-size: .76rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.profile-grid-stats {
  display: flex; gap: .9rem; color: #fff; font-size: .74rem; font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.profile-grid-stat { display: inline-flex; align-items: center; gap: .28rem; }
.profile-grid-stat i { font-size: .8rem; opacity: .95; }

@media (max-width: 600px) {
  .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

.profile-grid-menu { position: absolute; top: 2px; right: 2px; z-index: 3; }
.profile-grid-menu-btn {
  border: 0; padding: 0; background: rgba(0,0,0,.4); color: #fff;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; cursor: pointer; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.profile-grid-menu-btn:hover { background: rgba(0,0,0,.6); }
.profile-grid-empty { text-align: center; padding: 3rem 1rem; }
@media (max-width: 480px) {
  .profile-grid-caption { font-size: .72rem; }
  .profile-grid-stats { font-size: .72rem; }
}

/* Bio do perfil (estilo Instagram) */
.profile-bio { margin-top: .5rem; white-space: pre-line; font-size: .92rem; }

.profile-links { display: flex; gap: .5rem; margin-top: .6rem; }
.profile-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  color: var(--site-fg);
  font-size: 1.05rem;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.profile-link:hover {
  background: var(--site-accent-soft);
  color: var(--site-accent);
  border-color: var(--site-accent);
  transform: translateY(-1px);
}


/* ----- Página pública de letra (/letra/:slug) ----- */
.lyrics-hero {
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
}
.lyrics-cover {
  width: 140px; height: 140px; flex-shrink: 0;
  border-radius: .85rem; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.lyrics-cover img { width: 100%; height: 100%; object-fit: cover; }
.lyrics-style-badge {
  display: inline-block; margin-left: .5rem;
  padding: .15rem .6rem; border-radius: 999px;
  border: 1px solid var(--site-border, rgba(255,255,255,.25));
  font-size: .8rem;
}
.lyrics-hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.lyrics-text {
  max-width: 640px; margin: 0 auto;
  font-size: 1.1rem; line-height: 1.9;
}
.lyrics-text p { margin-bottom: 1.5rem; }

.lyrics-cta {
  position: relative; overflow: hidden;
  max-width: 640px; margin: 2.5rem auto 0;
  border-radius: 1rem; padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--site-accent) 30%, transparent), color-mix(in srgb, var(--site-accent) 12%, transparent));
  border: 1px solid color-mix(in srgb, var(--site-accent) 35%, transparent);
}
.lyrics-cta-glow {
  position: absolute; inset: -40%;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--site-accent) 35%, transparent), transparent 60%);
  pointer-events: none;
}
.lyrics-cta-body { position: relative; }
.lyrics-cta-title { font-size: 1.35rem; font-weight: 800; margin-bottom: .5rem; }
.lyrics-cta-sub { color: var(--site-muted, rgba(255,255,255,.7)); margin-bottom: 1.25rem; }

/* ----- Modal de cadastro/login pra visitante (feed e prévia do player) ----- */
.auth-modal-content {
  position: relative; border: 0; border-radius: 18px;
  padding: 2.2rem 1.5rem 1.8rem; text-align: center;
}
.auth-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.auth-modal-logo { height: 46px; margin-bottom: 1rem; }
.auth-modal-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .4rem; }
.auth-modal-sub { color: var(--bs-secondary-color, #777); margin-bottom: 1.4rem; }
.auth-modal-cta { display: block; width: 100%; border-radius: 999px; font-weight: 700; padding: .8rem; }
.auth-modal-login {
  display: inline-block; margin-top: 1rem;
  color: var(--bs-secondary-color, #777); text-decoration: none; font-size: .9rem;
}
.auth-modal-login:hover { text-decoration: underline; }

/* Selo "prévia de 1:30" pro visitante no player */
.guest-preview-pill {
  position: fixed;
  left: 50%; top: calc(3.6rem + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  z-index: 60;
  padding: .35rem .9rem; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .8rem; white-space: nowrap;
  backdrop-filter: blur(4px);
}
.guest-preview-pill a { color: var(--site-accent, #a86cff); font-weight: 700; }

/* ----- Painéis inline na /cantar (momentos e artistas, embaixo do carrossel) ----- */
.library-inline-panel {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 1rem;
  /* Borda em gradiente: fundo sólido no padding-box + gradiente no border-box */
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--site-card), var(--site-card)) padding-box,
    linear-gradient(135deg, var(--site-accent), #ff4fb6 55%, transparent 90%) border-box;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--site-accent) 18%, transparent);
  animation: inline-panel-in .25s ease;
}
@keyframes inline-panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.inline-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.inline-panel-title {
  font-size: 1.15rem; font-weight: 800; margin-bottom: .15rem;
}
.inline-panel-count { color: var(--site-muted); font-size: .85rem; }
.inline-panel-close {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--site-border);
  background: transparent; color: var(--site-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.inline-panel-close:hover {
  background: var(--site-accent); color: #fff; transform: rotate(90deg);
}
.inline-panel-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem; font-size: 1.4rem; color: var(--site-accent);
}
/* Card do carrossel com painel aberto ganha um realce */
.artist-coverflow-card.is-panel-open .artist-coverflow-photo {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
}

/* ----- Índice de letras (/letras): busca estilo "Google de letras" ----- */
.lyrics-search-box { max-width: 620px; }
.lyrics-results { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.lyrics-result {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--site-border);
  border-radius: .85rem;
  background: var(--site-card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lyrics-result:hover {
  border-color: color-mix(in srgb, var(--site-accent) 45%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--site-accent) 12%, transparent);
}
.lyrics-result-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .1rem; }
.lyrics-result-title a { color: inherit; text-decoration: none; }
.lyrics-result-title a:hover { color: var(--site-accent); }
.lyrics-result-meta { color: var(--site-muted); font-size: .85rem; margin-bottom: .35rem; }
.lyrics-result-snippet { color: var(--site-muted); font-size: .9rem; margin: 0; }
.lyrics-result-snippet mark {
  background: color-mix(in srgb, var(--site-accent) 25%, transparent);
  color: inherit; padding: 0 .15em; border-radius: .2em;
}
.lyrics-result-actions { display: flex; flex-direction: column; gap: .45rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
  .lyrics-result { flex-direction: column; align-items: stretch; }
  .lyrics-result-actions { flex-direction: row; }
  .lyrics-result-actions .btn { flex: 1; }
}
