/* ==========================================================================
   Party Player — estilos compartilhados (público, admin e setup)
   ========================================================================== */

:root {
  /* Paleta obrigatória */
  --bg: #0D1A26;
  --bg-2: #142535;
  --accent: #329BCC;
  --lime: #9FE870;
  --text: #FFFFFF;
  --muted: #A0ACB8;

  /* Derivados */
  --bg-3: #1B3145;
  --ink: #06121C;
  --line: rgba(160, 172, 184, .14);
  --line-strong: rgba(160, 172, 184, .3);
  --accent-soft: rgba(50, 155, 204, .16);
  --accent-glow: rgba(50, 155, 204, .45);
  --lime-soft: rgba(159, 232, 112, .13);
  --danger: #FF8080;
  --danger-soft: rgba(255, 128, 128, .13);
  --warn: #FFC857;
  --warn-soft: rgba(255, 200, 87, .13);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --shadow: 0 30px 60px -24px rgba(0, 0, 0, .7);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
svg { flex: none; }

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden;
}

/* ---------- Fundo com glow ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(60rem 36rem at 12% -10%, rgba(50, 155, 204, .28), transparent 62%),
    radial-gradient(40rem 30rem at 105% 20%, rgba(159, 232, 112, .09), transparent 60%),
    radial-gradient(50rem 40rem at 50% 115%, rgba(50, 155, 204, .14), transparent 60%),
    var(--bg);
}
.ambient::after {
  content: ""; position: absolute; width: 46rem; height: 46rem; left: 50%; top: 8%;
  margin-left: -23rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(50, 155, 204, .16), transparent);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-8%, -4%, 0) scale(1); }
  to { transform: translate3d(8%, 6%, 0) scale(1.15); }
}

/* ---------- Cabeçalho ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  max-width: 1320px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em;
}
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(50, 155, 204, .4)); }
.brand b { font-weight: 700; color: var(--lime); }

.topbar__status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Indicador / chips de status */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 32px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 99px;
  background: rgba(20, 37, 53, .7);
  font-size: .8rem; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.chip strong { color: var(--text); font-weight: 600; }
.chip__dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none;
  transition: background .3s, box-shadow .3s;
}
.chip[data-state="ok"] { color: var(--text); }
.chip[data-state="ok"] .chip__dot { background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft); animation: pulse 2.4s ease-in-out infinite; }
.chip[data-state="bad"] .chip__dot { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.chip[data-state="warn"] .chip__dot { background: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(159, 232, 112, 0); } }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(27, 49, 69, .55), rgba(20, 37, 53, .92));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: .82rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.card__title svg { width: 16px; height: 16px; color: var(--accent); }
.card__aside { font-size: .8rem; color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: .78rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}

/* Equalizador animado */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.eq i { width: 3px; height: 100%; border-radius: 2px; background: var(--lime); transform-origin: bottom; transform: scaleY(.3); }
.is-playing .eq i { animation: eq 1s ease-in-out infinite; }
.is-playing .eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.is-playing .eq i:nth-child(3) { animation-duration: 1.2s; animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------- Capas ---------- */
.cover {
  position: relative; overflow: hidden; flex: none;
  aspect-ratio: 1; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  display: grid; place-items: center;
}
.cover > svg { width: 38%; height: 38%; color: rgba(160, 172, 184, .4); }
.cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.04);
  transition: opacity .55s var(--ease), transform .8s var(--ease);
}
.cover img.is-in { opacity: 1; transform: none; }
.cover--sm { width: 52px; border-radius: 10px; }
.cover--md { width: 72px; border-radius: 12px; }
.cover--xl { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .06); }

/* skeleton quando vazio */
.cover.is-empty::after, .skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .06) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: shimmer 2.2s linear infinite;
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -130% 0; } }

.cover-wrap { position: relative; width: min(74vw, 340px); margin: 0 auto; }
.cover-aura {
  position: absolute; inset: 6% -4% -10%; z-index: 0; border-radius: 40px;
  background: var(--accent) center / cover no-repeat;
  filter: blur(46px) saturate(1.5); opacity: .42;
  transition: opacity .8s, background-image .8s;
}
.cover-aura.is-empty { opacity: .2; }
.cover-wrap .cover { z-index: 1; }

/* ---------- Progresso ---------- */
.progress {
  position: relative; height: 5px; border-radius: 99px;
  background: rgba(160, 172, 184, .18); overflow: visible;
}
.progress__fill {
  position: relative; height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--lime));
  transition: width .26s linear;
}
.progress__fill::after {
  content: ""; position: absolute; right: -5px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 12px 2px rgba(159, 232, 112, .7);
  opacity: 0; transition: opacity .3s;
}
.is-playing .progress__fill::after { opacity: 1; }
.times {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

/* Barra de votos */
.meter { height: 8px; border-radius: 99px; background: rgba(160, 172, 184, .16); overflow: hidden; }
.meter__fill {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--lime));
  transition: width .5s var(--ease);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgba(27, 49, 69, .7); color: var(--text);
  font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s var(--ease), box-shadow .2s, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover:not(:disabled) { background: var(--bg-3); border-color: var(--accent); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.is-busy { opacity: .65; pointer-events: none; }

.btn--primary { background: var(--accent); border-color: transparent; color: var(--ink); box-shadow: 0 10px 26px -10px var(--accent-glow); }
.btn--primary:hover:not(:disabled) { background: #4DB1E0; border-color: transparent; }
.btn--lime { background: var(--lime); border-color: transparent; color: var(--ink); box-shadow: 0 10px 26px -10px rgba(159, 232, 112, .5); }
.btn--lime:hover:not(:disabled) { background: #B4F08C; border-color: transparent; }
.btn--danger { color: var(--danger); border-color: rgba(255, 128, 128, .35); background: var(--danger-soft); }
.btn--danger:hover:not(:disabled) { border-color: var(--danger); background: rgba(255, 128, 128, .2); }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: .85rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid transparent; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer;
  transition: background .2s, transform .15s var(--ease), border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover:not(:disabled) { background: rgba(160, 172, 184, .14); }
.icon-btn:active:not(:disabled) { transform: scale(.92); }
.icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn--outline { border-color: var(--line-strong); background: rgba(20, 37, 53, .7); }
.icon-btn--play {
  width: 68px; height: 68px; background: var(--accent); color: var(--ink);
  box-shadow: 0 14px 34px -10px var(--accent-glow);
}
.icon-btn--play svg { width: 28px; height: 28px; }
.icon-btn--play:hover:not(:disabled) { background: #4DB1E0; transform: scale(1.04); }
.icon-btn--play .ico-pause { display: none; }
.icon-btn--play.is-playing .ico-pause { display: block; }
.icon-btn--play.is-playing .ico-play { display: none; }

/* ---------- Linha de faixa ---------- */
.track-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.track-row__body { min-width: 0; flex: 1; }
.track-row__title { font-weight: 600; font-size: .98rem; }
.track-row__sub { font-size: .85rem; color: var(--muted); }
.track-row__time { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.list > li { padding: 8px; margin: 0 -8px; border-radius: 14px; transition: background .2s; animation: rise .4s var(--ease) both; }
.list > li:hover { background: rgba(160, 172, 184, .07); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.empty { padding: 14px 0 6px; text-align: center; color: var(--muted); font-size: .9rem; }
.empty svg { width: 28px; height: 28px; margin: 0 auto 8px; display: block; opacity: .55; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  background: rgba(27, 49, 69, .96); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 500;
  animation: toast-in .3s var(--ease) both; pointer-events: auto;
}
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.toast--ok::before { background: var(--lime); }
.toast--error::before { background: var(--danger); }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }

/* ---------- Formulários ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgba(13, 26, 38, .7); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: rgba(160, 172, 184, .6); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input--mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88rem; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; }
.hint { font-size: .82rem; color: var(--muted); }
.form-msg { font-size: .88rem; min-height: 1.3em; }
.form-msg[data-kind="ok"] { color: var(--lime); }
.form-msg[data-kind="error"] { color: var(--danger); }

/* Stepper numérico */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(13, 26, 38, .7); }
.stepper button {
  width: 44px; height: 44px; border: 0; background: transparent; color: var(--text);
  font-size: 1.25rem; cursor: pointer; border-radius: 11px;
}
.stepper button:hover { background: rgba(160, 172, 184, .14); }
.stepper input {
  width: 52px; height: 44px; border: 0; background: transparent; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Toggle */
.switch {
  position: relative; width: 56px; height: 32px; flex: none; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 99px; background: rgba(13, 26, 38, .8); cursor: pointer;
  transition: background .25s, border-color .25s;
}
.switch::before { content: ""; position: absolute; inset: -7px 0; } /* alvo de toque 44px+ */
.switch::after {
  content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--muted); transition: transform .25s var(--ease), background .25s;
}
.switch[aria-checked="true"] { background: var(--lime-soft); border-color: var(--lime); }
.switch[aria-checked="true"]::after { transform: translateX(24px); background: var(--lime); }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; }
.setting + .setting { border-top: 1px solid var(--line); }
.setting__text { min-width: 0; }
.setting__text strong { display: block; font-size: .95rem; font-weight: 600; }
.setting__text span { font-size: .82rem; color: var(--muted); }

/* Slider (volume) */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; --val: 50%; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) var(--val), rgba(160, 172, 184, .2) var(--val)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); transition: transform .15s; }
.range:hover::-webkit-slider-thumb { transform: scale(1.15); }
.range::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(160, 172, 184, .2); }
.range::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--accent); }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }

/* ==========================================================================
   Página pública — vitrola retrô
   ========================================================================== */
@media (min-width: 1000px) {
  /* escala tudo (rem) em monitores grandes / TV */
  html.html-player { font-size: clamp(16px, .55vw + 9px, 28px); }
}

.page-player {
  --font-lcd: "VT323", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --font-tech: "Orbitron", "Outfit", system-ui, sans-serif;
  --lcd-blue: #8AD0F2;
}

/* grão sutil + moldura neon */
.grain {
  position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22160%22 height=%22160%22%3E%3Cfilter id=%22n%22%3E%3CfeTurbulence type=%22fractalNoise%22 baseFrequency=%22.9%22 numOctaves=%222%22 stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect width=%22100%25%22 height=%22100%25%22 filter=%22url(%23n)%22/%3E%3C/svg%3E");
}
.neon-frame { display: none; }
@media (min-width: 1000px) {
  .neon-frame {
    display: block; position: fixed; inset: .55rem; z-index: 5; pointer-events: none;
    border-radius: 1.5rem; border: 1px solid rgba(50, 155, 204, .5);
    box-shadow: 0 0 1.1rem rgba(50, 155, 204, .3), inset 0 0 1.1rem rgba(50, 155, 204, .14);
    opacity: .45; transition: opacity 1.2s;
  }
  body.is-playing .neon-frame { opacity: 1; animation: neon-frame 4.5s ease-in-out infinite; }
}
@keyframes neon-frame {
  50% { border-color: rgba(159, 232, 112, .6); box-shadow: 0 0 1.7rem rgba(159, 232, 112, .28), inset 0 0 1.4rem rgba(159, 232, 112, .12); }
}

.retro-layout {
  display: grid; gap: 1.4rem;
  max-width: 34rem; margin: 0 auto;
  padding: .25rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
}
.retro-layout > * { min-width: 0; }
.side { display: grid; gap: 1.1rem; align-content: start; min-width: 0; }

/* ---------- Toca-discos ---------- */
.deck { display: grid; justify-items: center; padding: .4rem 0 .2rem; }
.turntable { position: relative; width: min(100%, 30rem); aspect-ratio: 112 / 100; }

.platter {
  position: absolute; left: 0; top: 0; height: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle closest-side, #16293a 0 30%, #0f1d2a 60%, #0a141d 100%);
  box-shadow:
    0 0 0 1px rgba(160, 172, 184, .22),
    0 0 0 .4rem rgba(20, 37, 53, .7),
    0 0 0 calc(.4rem + 1px) rgba(50, 155, 204, .35),
    0 2.2rem 4rem -1.4rem rgba(0, 0, 0, .9),
    0 0 3.5rem rgba(50, 155, 204, .22);
}
.is-playing .platter { animation: platter-glow 3.6s ease-in-out infinite; }
@keyframes platter-glow {
  50% {
    box-shadow:
      0 0 0 1px rgba(160, 172, 184, .22),
      0 0 0 .4rem rgba(20, 37, 53, .7),
      0 0 0 calc(.4rem + 1px) rgba(159, 232, 112, .5),
      0 2.2rem 4rem -1.4rem rgba(0, 0, 0, .9),
      0 0 5rem rgba(50, 155, 204, .42);
  }
}
/* pontos estroboscópicos na borda do prato */
.platter::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-conic-gradient(rgba(160, 172, 184, .55) 0 1deg, transparent 1deg 4deg);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 94.5%, #000 95% 98.5%, transparent 99%);
  mask: radial-gradient(circle closest-side, transparent 0 94.5%, #000 95% 98.5%, transparent 99%);
}
/* feltro do prato (aparece quando não há disco) */
.platter::after {
  content: ""; position: absolute; inset: 7%; border-radius: 50%;
  background: repeating-radial-gradient(circle, #14273a 0 5px, #101f2e 5px 10px);
  box-shadow: inset 0 0 2rem rgba(0, 0, 0, .55);
}

.disc-slot {
  position: absolute; inset: 4%; z-index: 1;
  transition: transform 1s var(--ease), opacity .7s;
}
.is-idle .disc-slot { opacity: 0; transform: translateX(-55%) rotate(-28deg); }
.disc-slot.is-swapping { animation: vinyl-swap 1.25s var(--ease); }
@keyframes vinyl-swap {
  40%, 52% { transform: translateX(-68%) rotate(-32deg); opacity: 0; }
}

.disc {
  position: absolute; inset: 0; border-radius: 50%; will-change: transform;
  background:
    conic-gradient(from 0deg, rgba(255, 255, 255, .06), transparent 11%, transparent 47%, rgba(255, 255, 255, .045) 55%, transparent 67%),
    radial-gradient(circle closest-side, transparent 0 56.6%, rgba(255, 255, 255, .08) 57% 57.7%, transparent 58.1% 75.6%, rgba(255, 255, 255, .07) 76% 76.7%, transparent 77.1% 96%, rgba(255, 255, 255, .06) 96.5%),
    repeating-radial-gradient(circle, #07080a 0 1px, #16181c 1px 2.5px),
    #0b0c0e;
  box-shadow: 0 0 0 1px #000, 0 .7rem 1.6rem rgba(0, 0, 0, .65);
}
/* reflexo de luz (fixo — a luz não gira com o disco) */
.disc__shine {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: conic-gradient(from 32deg,
    transparent 0 4%, rgba(138, 208, 242, .2) 9%, transparent 15% 30%,
    rgba(159, 232, 112, .05) 36%, transparent 42% 52%,
    rgba(255, 255, 255, .13) 59%, transparent 66%);
  -webkit-mask: radial-gradient(circle closest-side, transparent 0 37.5%, #000 38.5% 97%, transparent 98%);
  mask: radial-gradient(circle closest-side, transparent 0 37.5%, #000 38.5% 97%, transparent 98%);
}
/* rótulo central = capa do álbum */
.disc__label {
  position: absolute; inset: 32%; width: auto; aspect-ratio: auto; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--lime));
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .65), 0 0 0 .3rem rgba(255, 255, 255, .035);
}
.disc__label > svg { color: rgba(6, 18, 28, .55); }
.disc__label.is-empty::after { display: none; }
.spindle {
  position: absolute; left: 50%; top: 50%; z-index: 3; width: 3.4%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #f4f8fb, #7f8c98 70%);
  box-shadow: 0 0 0 .22rem #0b0c0e, 0 0 0 calc(.22rem + 1px) rgba(255, 255, 255, .12);
}

/* braço da agulha */
.tonearm {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; overflow: visible; pointer-events: none;
  filter: drop-shadow(.35rem .55rem .35rem rgba(0, 0, 0, .55));
}
#tonearm-arm {
  transform-box: view-box; transform-origin: 101px 14px;
  transform: rotate(var(--arm, -8deg));
  transition: transform 1.1s cubic-bezier(.35, .05, .2, 1);
}

.onair {
  position: absolute; right: 0; bottom: 1%; z-index: 4;
  display: inline-flex; align-items: center; gap: .4em; padding: .3em .6em;
  border: 1px solid var(--line-strong); border-radius: .4em; background: rgba(13, 26, 38, .85);
  font-family: var(--font-tech); font-size: .56rem; font-weight: 700; letter-spacing: .14em; white-space: nowrap;
  color: rgba(160, 172, 184, .55); transition: color .6s, border-color .6s, box-shadow .6s;
}
.onair i { width: .6em; height: .6em; border-radius: 50%; background: rgba(160, 172, 184, .4); transition: background .6s, box-shadow .6s; }
.is-playing .onair { color: var(--lime); border-color: rgba(159, 232, 112, .6); box-shadow: 0 0 1rem rgba(159, 232, 112, .25); }
.is-playing .onair i { background: var(--lime); box-shadow: 0 0 .6em var(--lime); animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Display estilo aparelho de som ---------- */
.lcd {
  position: relative; overflow: hidden; border-radius: 1rem; padding: 1rem 1.1rem 1.15rem;
  background: linear-gradient(180deg, #0a1722, #06101a);
  border: 1px solid rgba(50, 155, 204, .4);
  box-shadow: 0 0 0 .32rem var(--bg-2), 0 0 0 calc(.32rem + 1px) var(--line-strong),
    inset 0 0 2.6rem rgba(50, 155, 204, .13), 0 1.6rem 3rem -1.4rem rgba(0, 0, 0, .85);
  margin: .32rem;
}
.lcd::before { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .2) 0 1px, transparent 1px 3px);
}
.lcd__top {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem;
  font-family: var(--font-tech); font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.lcd__state { display: inline-flex; align-items: center; gap: .6em; color: var(--lcd-blue); }
.is-idle .lcd__state { color: var(--muted); }
.lcd__tags { display: flex; gap: .5em; }
.lcd__tags span { padding: .2em .5em; border: 1px solid var(--line-strong); border-radius: .3em; }
.lcd__text { display: grid; gap: .1rem; min-height: 6.2rem; align-content: start; }
.lcd__title {
  font-family: var(--font-lcd); font-size: clamp(2rem, 9vw, 2.9rem); line-height: .92; text-transform: uppercase;
  color: var(--lime); text-shadow: 0 0 .7rem rgba(159, 232, 112, .5); overflow-wrap: anywhere;
}
.lcd__artist {
  font-family: var(--font-lcd); font-size: 1.6rem; line-height: 1.05; text-transform: uppercase;
  color: var(--lcd-blue); text-shadow: 0 0 .6rem rgba(50, 155, 204, .55); overflow-wrap: anywhere;
}
.lcd__album { font-family: var(--font-lcd); font-size: 1.25rem; line-height: 1.1; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.is-idle .lcd__title { color: var(--muted); text-shadow: none; font-size: 1.8rem; line-height: 1; animation: standby 2.4s ease-in-out infinite; }
@keyframes standby { 50% { opacity: .55; } }

.lcd__time {
  display: flex; align-items: baseline; justify-content: space-between; margin: .7rem 0 .35rem;
  font-family: var(--font-lcd); font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.lcd__time #time-cur { color: var(--lime); text-shadow: 0 0 .6rem rgba(159, 232, 112, .5); }
.lcd__time #time-dur { color: var(--muted); font-size: 1.5rem; }
.lcd-bar, .led-meter {
  --seg: repeating-linear-gradient(90deg, #000 0 .34rem, transparent .34rem .5rem);
  position: relative; height: .85rem;
}
.lcd-bar::before, .led-meter::before {
  content: ""; position: absolute; inset: 0; background: rgba(160, 172, 184, .16);
  -webkit-mask: var(--seg); mask: var(--seg);
}
.lcd-bar__fill, .led-meter__fill {
  position: relative; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--lime)); background-size: 100vw 100%;
  -webkit-mask: var(--seg); mask: var(--seg);
  transition: width .26s linear;
}
.led-meter__fill { transition: width .5s var(--ease); }

/* ---------- Painéis retrô ---------- */
.page-player .card { border-radius: 1.1rem; padding: 1.1rem; }
.page-player .card__title { font-family: var(--font-tech); font-size: .68rem; letter-spacing: .18em; }
.page-player .track-row__time, .page-player .card__aside { font-family: var(--font-lcd); font-size: 1.2rem; color: var(--lcd-blue); }

/* Botão arcade */
.vote-btn {
  --depth: .5rem;
  position: relative; display: flex; align-items: center; justify-content: center; gap: .7rem;
  width: 100%; min-height: 4.2rem; padding: .8rem 1.2rem; margin-bottom: var(--depth);
  border: 0; border-radius: 1rem; cursor: pointer;
  background: linear-gradient(180deg, #5cc0ee, var(--accent) 60%);
  color: var(--ink);
  font-family: var(--font-tech); font-size: 1.05rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 var(--depth) 0 #1b6185, 0 calc(var(--depth) + .9rem) 1.8rem -.5rem var(--accent-glow), inset 0 2px 0 rgba(255, 255, 255, .45);
  transition: transform .09s ease-out, box-shadow .09s ease-out, background .3s, color .3s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.vote-btn svg { width: 1.5rem; height: 1.5rem; }
.vote-btn:hover:not(:disabled) { filter: brightness(1.08); }
.vote-btn:active:not(:disabled) {
  transform: translateY(calc(var(--depth) - 2px));
  box-shadow: 0 2px 0 #1b6185, 0 .5rem 1rem -.4rem var(--accent-glow), inset 0 2px 0 rgba(255, 255, 255, .3);
}
.vote-btn:disabled {
  cursor: not-allowed; transform: translateY(calc(var(--depth) - 2px));
  background: var(--bg-3); color: var(--muted);
  box-shadow: 0 2px 0 #0a141d, inset 0 2px .4rem rgba(0, 0, 0, .35);
}
.vote-btn.is-voted, .vote-btn.is-voted:disabled {
  background: rgba(159, 232, 112, .14); color: var(--lime); letter-spacing: .06em;
  box-shadow: 0 2px 0 #0a141d, inset 0 0 0 2px var(--lime), 0 0 1.4rem rgba(159, 232, 112, .25);
  animation: pop .45s var(--ease);
}
@keyframes pop { 0% { filter: brightness(1.8); } }
.vote__info { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .6rem; margin: .9rem 0 .5rem; }
.vote__count { font-family: var(--font-lcd); font-size: 1.5rem; line-height: 1; text-transform: uppercase; }
.vote__count b { font-weight: 400; font-size: 2.1rem; color: var(--lime); text-shadow: 0 0 .6rem rgba(159, 232, 112, .5); }
.vote__hint { font-size: .8rem; color: var(--muted); text-align: right; }

/* Próxima: capa com o disco saindo da luva */
.sleeve { position: relative; flex: none; margin-right: 1.9rem; }
.sleeve .cover { width: 4.6rem; border-radius: .3rem; z-index: 1; box-shadow: .25rem .4rem .9rem rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
.sleeve__disc {
  position: absolute; top: 5%; bottom: 5%; left: 42%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #0b0c0e 0 7%, var(--accent) 8% 30%, transparent 31%),
    repeating-radial-gradient(circle, #07080a 0 1px, #191b20 1px 2.5px);
  box-shadow: 0 0 0 1px #000;
}

/* Tocadas hoje: compactos (singles) */
.single { border-radius: 50%; box-shadow: 0 0 0 .28rem #0b0c0e, 0 0 0 calc(.28rem + 1px) rgba(255, 255, 255, .1); margin: .28rem; }
.single::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 2; width: 16%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); background: var(--bg-2); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
}

.fade-swap { animation: fade-swap .6s var(--ease); }
@keyframes fade-swap { from { opacity: 0; transform: translateY(.4rem); } }

@media (min-width: 1000px) {
  .retro-layout {
    max-width: 92rem; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem;
    align-items: start; padding: .5rem 3rem 2rem;
  }
  .page-player .topbar { max-width: 92rem; padding-inline: 3rem; }
  /* display em cima; votação e próxima lado a lado; histórico embaixo */
  @media (min-width: 1280px) {
    .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .side > .lcd, .side > .history-card { grid-column: 1 / -1; }
    .vote-btn { font-size: .95rem; letter-spacing: .08em; padding-inline: .6rem; }
  }
  .deck { position: sticky; top: 1rem; min-height: calc(100vh - 7.5rem); align-content: center; }
  .turntable { width: min(100%, calc((100vh - 10rem) * 1.12)); }
  .history-box { max-height: max(9.5rem, calc(100vh - 43rem)); overflow-y: auto; margin: 0 -.5rem; padding: 0 .5rem; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }
  .onair { font-size: .7rem; }
}

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-main { max-width: 1320px; margin: 0 auto; padding: 4px 18px 48px; display: grid; gap: 16px; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: var(--r-md);
  border: 1px solid rgba(50, 155, 204, .45); background: var(--accent-soft);
}
.banner--warn { border-color: rgba(255, 200, 87, .45); background: var(--warn-soft); }
.banner__text { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 260px; }
.banner__text svg { width: 22px; height: 22px; color: var(--accent); }
.banner--warn .banner__text svg { color: var(--warn); }
.banner__text strong { display: block; }
.banner__text span { font-size: .88rem; color: var(--muted); }

.admin-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.admin-grid > * { min-width: 0; }

.hero { display: grid; gap: 22px; padding: 22px; overflow: hidden; }
.hero .cover-wrap { width: min(70vw, 260px); }
.hero__body { position: relative; z-index: 1; min-width: 0; display: grid; gap: 6px; align-content: center; }
.hero__title { margin-top: 6px; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero__artist { font-size: 1.05rem; font-weight: 500; }
.hero__album { font-size: .88rem; color: var(--muted); }
.hero__progress { margin-top: 18px; }
.hero__controls { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; margin-top: 10px; }
.transport { display: flex; align-items: center; gap: 12px; }
.volume { display: flex; align-items: center; gap: 10px; flex: 1 1 200px; max-width: 300px; color: var(--muted); }
.volume svg { width: 20px; height: 20px; }
.volume output { width: 3ch; text-align: right; font-size: .82rem; font-variant-numeric: tabular-nums; }
.hero.is-idle .hero__title { color: var(--muted); font-weight: 500; }
.hero.is-idle .eyebrow { color: var(--muted); }

.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }

.big-count { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.big-count b { color: var(--lime); font-weight: 700; }
.big-count span { font-size: 1.2rem; color: var(--muted); font-weight: 500; }
.voters { display: flex; flex-wrap: wrap; gap: 6px; }
.voter {
  padding: 3px 9px; border-radius: 99px; background: var(--accent-soft); color: var(--muted);
  font: .74rem ui-monospace, Consolas, monospace;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none; align-self: flex-start;
  padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-strong);
  font-size: .76rem; font-weight: 600; color: var(--muted);
}
.badge svg { width: 14px; height: 14px; }
.badge[data-on="true"] { color: var(--lime); border-color: rgba(159, 232, 112, .45); background: var(--lime-soft); }

.history-scroll { max-height: 420px; overflow-y: auto; margin: 0 -8px; padding: 0 8px; scrollbar-width: thin; scrollbar-color: var(--bg-3) transparent; }

.link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; }
.link:hover { text-decoration: underline; }
.link svg { width: 16px; height: 16px; }

@media (min-width: 720px) {
  .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-column: 1 / -1; grid-template-columns: 240px minmax(0, 1fr); padding: 28px; gap: 30px; }
  .hero .cover-wrap { width: 240px; }
  .area-history { grid-column: 1 / -1; }
}
@media (min-width: 1120px) {
  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      "hero hero next"
      "hero hero votes"
      "playlist quick history";
  }
  .hero { grid-area: hero; grid-template-columns: 280px minmax(0, 1fr); padding: 32px; }
  .hero .cover-wrap { width: 280px; }
  .area-next { grid-area: next; }
  .area-votes { grid-area: votes; }
  .area-playlist { grid-area: playlist; }
  .area-quick { grid-area: quick; }
  .area-history { grid-area: history; }
}

/* Drawer de configurações */
.backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 18, 28, .66);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(420px, 100vw); padding: 20px; overflow-y: auto;
  background: var(--bg-2); border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 60px -20px rgba(0, 0, 0, .6);
  transform: translateX(104%); visibility: hidden;
  transition: transform .35s var(--ease), visibility 0s .35s;
  display: grid; gap: 22px; align-content: start;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head h2 { font-family: var(--font-display); font-size: 1.3rem; }
.drawer section { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.drawer h3 { font-family: var(--font-display); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .86rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }

/* Overlay "Ativar áudio" */
.gate {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
  background: rgba(6, 18, 28, .8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: gate-in .3s var(--ease);
}
@keyframes gate-in { from { opacity: 0; } }
.gate__box {
  width: min(440px, 100%); padding: 32px 26px; text-align: center; display: grid; gap: 14px; justify-items: center;
  border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--bg-2); box-shadow: var(--shadow);
}
.gate__icon {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 10px rgba(50, 155, 204, .07);
}
.gate__icon svg { width: 34px; height: 34px; }
.gate__box h2 { font-family: var(--font-display); font-size: 1.5rem; }
.gate__box p { color: var(--muted); font-size: .95rem; }
.gate__box .btn { min-height: 56px; padding: 0 30px; font-size: 1.05rem; margin-top: 6px; }

/* ==========================================================================
   Setup / Login
   ========================================================================== */
.setup-main { max-width: 680px; margin: 0 auto; padding: 8px 16px 56px; display: grid; gap: 16px; }
.setup-main--narrow { max-width: 440px; padding-top: 6vh; }
.setup-hero { text-align: center; padding: 14px 0 6px; display: grid; gap: 8px; justify-items: center; }
.setup-hero img { width: 72px; height: 72px; filter: drop-shadow(0 14px 30px rgba(50, 155, 204, .45)); }
.setup-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 5vw, 2.2rem); letter-spacing: -.02em; }
.setup-hero p { color: var(--muted); max-width: 46ch; }

.step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; }
.step__num {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(50, 155, 204, .5);
  font-family: var(--font-display); font-weight: 700;
}
.step__body { display: grid; gap: 14px; min-width: 0; }
.step__body h2 { font-family: var(--font-display); font-size: 1.15rem; line-height: 36px; }
.steps-list { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--muted); font-size: .93rem; }
.steps-list strong, .steps-list code { color: var(--text); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: rgba(13, 26, 38, .7); padding: 2px 6px; border-radius: 6px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: .9rem; border: 1px solid rgba(255, 128, 128, .4); background: var(--danger-soft); color: var(--danger); }

@media (max-width: 520px) {
  .step { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .topbar { padding: 10px 14px; }
  .chip--hide-sm { display: none; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .eq i { transform: scaleY(.6); }
  .cover img { transform: none; }
}
