/* Palco — tema escuro de palco, mobile-first */

:root {
  --bg-0: #0b0614;
  --bg-1: #1a0b2e;
  --bg-2: #241040;
  --magenta: #ff3d9a;
  --roxo: #b44dff;
  --ciano: #3de0ff;
  --ouro: #ffc83d;
  --verde: #3dffa8;
  --vermelho: #ff5c6c;
  /* botões de SAIR (palco, rádio, Minha conta): vermelho cheio com letra branca (dono 21/10: "põe em vermelho os
     botões de saída"); mais escuro que o --vermelho pra letra branca ler bem */
  --sair: #d92d43;
  --sair-forte: #ea3c52;
  --texto: #f6f1ff;
  --texto-2: rgba(246, 241, 255, 0.74);
  --texto-3: rgba(246, 241, 255, 0.52);
  --card: rgba(255, 255, 255, 0.05);
  --card-2: rgba(255, 255, 255, 0.085);
  --borda: rgba(255, 255, 255, 0.10);
  --borda-2: rgba(255, 255, 255, 0.18);
  --raio: 16px;
  --raio-btn: 14px;
  --grad-primario: linear-gradient(135deg, #ff3d9a 0%, #c43dff 100%);
  --grad-marca: linear-gradient(90deg, #ff3d9a 0%, #b870ff 50%, #3de0ff 100%);
  --sombra: 0 12px 32px rgba(0, 0, 0, 0.38);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  color-scheme: dark;
}

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-0);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
b, strong { font-weight: 700; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ic {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-cheio { fill: currentColor; stroke: none; }
.ic-mag { color: var(--magenta); }
.ic-ciano { color: var(--ciano); }

h1[tabindex="-1"]:focus { outline: none; }

/* ---------- fundo com holofotes ---------- */
.fundo {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(170deg, var(--bg-0) 0%, var(--bg-1) 70%, #200d38 100%);
}
.holofote {
  position: absolute;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  will-change: transform;
}
.holofote-a {
  top: -48vmax;
  left: -38vmax;
  background: radial-gradient(circle, rgba(255, 61, 154, 0.26) 0%, rgba(255, 61, 154, 0) 62%);
  animation: flutuar 19s ease-in-out infinite alternate;
}
.holofote-b {
  top: -44vmax;
  right: -44vmax;
  background: radial-gradient(circle, rgba(61, 224, 255, 0.16) 0%, rgba(61, 224, 255, 0) 62%);
  animation: flutuar 23s ease-in-out infinite alternate-reverse;
}
.holofote-c {
  bottom: -60vmax;
  left: -20vmax;
  background: radial-gradient(circle, rgba(180, 77, 255, 0.16) 0%, rgba(180, 77, 255, 0) 60%);
  animation: flutuar 27s ease-in-out infinite alternate;
}
@keyframes flutuar {
  to { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
}

/* ---------- casca ---------- */
#app {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    calc(var(--safe-t) + 10px)
    calc(var(--safe-r) + 16px)
    calc(var(--safe-b) + 28px)
    calc(var(--safe-l) + 16px);
}

.tela {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tela.ativa { animation: entrar 0.34s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes entrar {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.pilha { display: flex; flex-direction: column; gap: 12px; }
.acoes { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.centro { text-align: center; }

/* ---------- topo ---------- */
.topo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
}
.topo-bloco { min-width: 0; flex: 1; }
.topo-titulo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-sub {
  color: var(--texto-3);
  font-size: 0.88rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-sub b { color: var(--texto-2); }
.topo-kicker {
  color: var(--magenta);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.topo-centro { justify-content: center; padding-top: 6px; }
.topo-centro .topo-titulo { white-space: normal; font-size: 1.35rem; }
.topo-marca { justify-content: space-between; }
.marca-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.marca-mini .ic {
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 10px;
  background: var(--grad-primario);
  color: #fff;
  stroke-width: 2.2;
}

/* ---------- botoes ---------- */
.btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--raio-btn);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  color: var(--texto);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.12s ease, filter 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn:focus-visible,
.btn-icone:focus-visible,
.btn-texto:focus-visible,
.cartao-id:focus-visible,
.item-botao:focus-visible {
  outline: 2px solid var(--ciano);
  outline-offset: 3px;
}
.btn-primario {
  background: var(--grad-primario);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 61, 154, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-primario:hover { filter: brightness(1.07); }
.btn-secundario {
  background: var(--card-2);
  border: 1px solid var(--borda-2);
}
.btn-secundario:hover { background: rgba(255, 255, 255, 0.12); }
.btn-ciano {
  background: var(--ciano);
  color: #041620;
  box-shadow: 0 8px 22px rgba(61, 224, 255, 0.25);
}
.btn-parar {
  background: linear-gradient(135deg, #ff5c6c 0%, #ff3d9a 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 92, 108, 0.35);
}
.btn-grande {
  width: 100%;
  min-height: 56px;
  font-size: 1.06rem;
}
.btn .ic { width: 22px; height: 22px; }

.btn-icone {
  appearance: none;
  border: 1px solid var(--borda);
  background: var(--card);
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--texto);
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn-icone:active { transform: scale(0.92); }
.btn-icone .ic { width: 22px; height: 22px; }

/* Sair do palco: a antiga setinha sem texto virou um botão com a palavra (gente leiga não achava a saída) */
.btn-sair-palco {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 48px;
  padding: 0 16px 0 13px;
  border: 1px solid transparent;
  background: var(--sair);
  border-radius: 14px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn-sair-palco:hover { background: var(--sair-forte); }
.btn-sair-palco:active { transform: scale(0.94); }
.btn-sair-palco .ic { width: 20px; height: 20px; }

/* casinha flutuante — volta pro Início de qualquer aba (mostrarSecao liga/desliga por tela) */
.btn-casa {
  position: fixed;
  top: calc(var(--safe-t) + 14px);
  right: calc(var(--safe-r) + 14px);
  z-index: 60;
  appearance: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: color-mix(in srgb, var(--card) 85%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--magenta);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.btn-casa[hidden] { display: none; }
.btn-casa .ic { width: 22px; height: 22px; stroke-width: 2; }
.btn-casa:active { transform: scale(0.9); }
@media (hover: hover) {
  .btn-casa:hover { box-shadow: 0 8px 26px rgba(255, 61, 154, 0.3); }
}
/* PC/tela larga (21/10): o catálogo, Minha conta e a Festa ficam na MESMA coluna de 480 px do Início e do cartão do
   Kobalski (a pílula "Achar música"), e a casinha mora dentro da coluna (antes ficava perdida no canto da janela).
   Sem :has() (TV velha) segue como era: coluna de 560 e casinha no canto. O palco e o resultado não mudam. */
#app:has(> #tela-catalogo:not([hidden])),
#app:has(> #tela-eu:not([hidden])),
#app:has(> #tela-festa:not([hidden])) { max-width: 480px; }
@media (min-width: 560px) {
  #app:has(> #tela-catalogo:not([hidden])) > .btn-casa,
  #app:has(> #tela-eu:not([hidden])) > .btn-casa,
  #app:has(> #tela-festa:not([hidden])) > .btn-casa { right: calc((100% - 480px) / 2 + 14px); }
}

/* QR da festa no canto (palco/resultado) — convidado novo entra na fila sem esperar a vez acabar.
   Canto inferior esquerdo: numa TV larga cai na margem lateral, fora da coluna de conteúdo. */
.qr-vivo {
  position: fixed;
  left: calc(var(--safe-l) + 14px);
  bottom: calc(var(--safe-b) + 14px);
  z-index: 55;
  pointer-events: none; /* é só pra olhar/escanear: o toque atravessa pros botões debaixo */
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 13px 10px 10px;
  border-radius: 18px;
  border: 1px solid var(--borda);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  max-width: min(80vw, 300px);
}
.qr-vivo[hidden] { display: none; }
.qr-vivo-qr {
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 10px;
  padding: 5px;
}
.qr-vivo-qr svg { width: 100%; height: 100%; display: block; }
.qr-vivo-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.qr-vivo-rot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--texto-2);
}
.qr-vivo-rot .ic { width: 15px; height: 15px; color: var(--magenta); }
.qr-vivo-codigo {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.05;
  background: var(--grad-marca);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.qr-vivo-dica {
  font-size: 0.68rem;
  color: var(--texto-3);
  line-height: 1.25;
}
@media (max-width: 420px) {
  .qr-vivo { gap: 9px; padding: 8px 10px 8px 8px; }
  .qr-vivo-qr { width: 72px; height: 72px; }
  .qr-vivo-codigo { font-size: 1.3rem; }
  .qr-vivo-dica { display: none; }
}

.btn-texto {
  appearance: none;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 6px;
  color: var(--ciano);
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}
.btn-texto .ic { width: 18px; height: 18px; }

/* ---------- cards e textos ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 16px;
}
.card-titulo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.card-titulo .ic { width: 18px; height: 18px; }
.rotulo {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
}
.dica {
  color: var(--texto-3);
  font-size: 0.88rem;
  margin-top: 6px;
}
.erro {
  color: #ffb0b8;
  background: rgba(255, 92, 108, 0.1);
  border: 1px solid rgba(255, 92, 108, 0.35);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-top: 10px;
}
.pilha > .erro { margin-top: 0; }
.vazio {
  color: var(--texto-3);
  font-size: 0.9rem;
  padding: 6px 0 2px;
}
.rodape-nota {
  color: var(--texto-3);
  font-size: 0.8rem;
  text-align: center;
  padding: 4px 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ciano);
  background: rgba(61, 224, 255, 0.1);
  border: 1px solid rgba(61, 224, 255, 0.28);
}

/* ---------- inputs ---------- */
.input {
  width: 100%;
  min-height: 52px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--borda-2);
  background: rgba(0, 0, 0, 0.3);
  color: var(--texto);
  font: inherit;
  font-size: 1.06rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: rgba(246, 241, 255, 0.32); }
.input:focus {
  outline: none;
  border-color: var(--ciano);
  box-shadow: 0 0 0 3px rgba(61, 224, 255, 0.2);
}
.input-id {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.linha-input {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}
.linha-input .input { margin-top: 0; flex: 1; min-width: 0; }
.linha-input .btn { flex: none; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip { position: relative; display: inline-flex; }
.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--borda-2);
  background: var(--card-2);
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}
.chip input:active + span { transform: scale(0.96); }
.chip input:checked + span {
  color: #fff;
  background: rgba(255, 61, 154, 0.2);
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 61, 154, 0.16), 0 6px 18px rgba(255, 61, 154, 0.2);
}
.chip input:focus-visible + span { outline: 2px solid var(--ciano); outline-offset: 2px; }

/* ---------- boas-vindas ---------- */
.tela-boas {
  justify-content: center;
  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - var(--safe-t) - var(--safe-b) - 40px);
  gap: 18px;
}
.boas-hero { text-align: center; padding: 12px 0 6px; }
/* a marca: o ícone do Kobalski (coroa + microfone dourados no quadrado escuro, marca/), com o brilho
   dourado pulsando em volta. O canto do brilho acompanha o do ícone (22% do lado). */
.logo-marca {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 22%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 8px rgba(203, 161, 58, 0.12), 0 20px 50px rgba(203, 161, 58, 0.4);
  animation: pulsar 3.2s ease-in-out infinite;
}
.logo-marca .ic { width: 46px; height: 46px; color: #fff; stroke-width: 1.8; }
.logo-marca .marca-icone { display: block; width: 100%; height: 100%; border-radius: 22%; }
@media (prefers-reduced-motion: reduce) { .logo-marca { animation: none; } }
@keyframes pulsar {
  0%, 100% { box-shadow: 0 0 0 8px rgba(203, 161, 58, 0.12), 0 20px 50px rgba(203, 161, 58, 0.4); }
  50% { box-shadow: 0 0 0 14px rgba(203, 161, 58, 0.06), 0 20px 60px rgba(203, 161, 58, 0.52); }
}
.logo-texto {
  font-size: clamp(3.2rem, 17vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: var(--grad-marca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 4px;
}
.slogan {
  color: var(--texto-2);
  margin: 12px auto 0;
  max-width: 30ch;
  font-size: 1.02rem;
}
.entrar-card { animation: entrar 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }

/* itens de lista clicaveis */
.lista-mini {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.lista-mini > li + li { border-top: 1px solid var(--borda); }
.item-botao {
  appearance: none;
  width: 100%;
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 2px;
  text-align: left;
  cursor: pointer;
  border-radius: 12px;
  color: var(--texto);
  touch-action: manipulation;
  transition: background-color 0.2s ease;
}
.item-botao:active { background: rgba(255, 255, 255, 0.05); }
.item-linha {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 2px;
}
.item-textos {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.item-textos b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-textos small {
  color: var(--texto-3);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-botao > .ic { color: var(--texto-3); width: 18px; height: 18px; }
.pill-cantar {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-primario);
  color: #fff;
  flex: none;
  box-shadow: 0 6px 16px rgba(255, 61, 154, 0.3);
}
.pill-cantar .ic { width: 16px; height: 16px; fill: currentColor; stroke: none; margin-left: 2px; }
.capa-mini {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 320) 90% 58%), hsl(calc(var(--h, 320) + 55) 85% 42%));
}
.capa-mini .ic { width: 20px; height: 20px; }

/* avatar */
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, hsl(var(--h, 320) 92% 60%), hsl(calc(var(--h, 320) + 60) 88% 44%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.avatar-p { width: 42px; height: 42px; font-size: 0.95rem; }
.avatar-g {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
  box-shadow: 0 0 0 3px var(--bg-0), 0 0 0 5px rgba(255, 61, 154, 0.55), 0 14px 34px rgba(255, 61, 154, 0.3);
}

/* ---------- cartao do ID ---------- */
.cartao-id {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 22px 16px;
  border-radius: var(--raio);
  border: 2px solid transparent;
  background:
    linear-gradient(160deg, #1d0c33, #120822) padding-box,
    var(--grad-marca) border-box;
  text-align: center;
  color: var(--texto);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(255, 61, 154, 0.16);
}
.cartao-id::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: brilho 5s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}
/* so transform (compositor): animar `left` relayoutava a tela inteira a cada frame.
   O brilho tem 40% do cartao, entao andar 190% do cartao = 475% dele mesmo. */
@keyframes brilho {
  0%, 60% { transform: translateX(0) skewX(-18deg); }
  100% { transform: translateX(475%) skewX(-18deg); }
}
.cartao-rotulo {
  color: var(--texto-3);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.id-grande,
.id-medio {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  background: var(--grad-marca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.id-grande { font-size: clamp(2.5rem, 14vw, 3.7rem); margin: 6px 0 2px; }
.id-medio { font-size: clamp(1.8rem, 9vw, 2.3rem); }
.cartao-nome { color: var(--texto-2); font-weight: 700; }
.cartao-compacto {
  cursor: pointer;
  padding: 16px;
  touch-action: manipulation;
  transition: transform 0.12s ease;
}
.cartao-compacto:active { transform: scale(0.98); }
.cartao-copiar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--ciano);
  font-weight: 700;
  font-size: 0.88rem;
}
.cartao-copiar .ic { width: 16px; height: 16px; }
.criado .cartao-id { animation: revelar 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes revelar {
  from { opacity: 0; transform: scale(0.85) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}

/* ---------- perfil ---------- */
.perfil-cabeca {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 2px;
}
.perfil-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.perfil-nome {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.nivel-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nivel-nome {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 2px 0 10px;
  background: linear-gradient(90deg, #fff, #ffd1e7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nivel-prox { color: var(--texto-3); font-size: 0.86rem; margin-top: 8px; }
.barra {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.barra > span {
  display: block;
  height: 100%;
  width: calc(var(--pct, 0) * 100%);
  border-radius: inherit;
  background: var(--grad-marca);
  box-shadow: 0 0 14px rgba(61, 224, 255, 0.45);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.badge-subiu {
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1b1200;
  background: var(--ouro);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(255, 200, 61, 0.45);
  animation: revelar 0.6s cubic-bezier(0.2, 1.3, 0.4, 1) both 0.6s;
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-valor {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-rotulo {
  color: var(--texto-2);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stat-extra { color: var(--texto-3); font-size: 0.8rem; }

/* status ao vivo */
.aovivo {
  display: flex;
  align-items: center;
  gap: 14px;
  border-style: dashed;
  border-color: rgba(255, 61, 154, 0.35);
}
.aovivo-ic {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 61, 154, 0.12);
  color: var(--magenta);
}
.aovivo-ic .ic { width: 22px; height: 22px; }
.aovivo b { display: block; line-height: 1.3; }
.aovivo small { display: block; color: var(--texto-3); font-size: 0.84rem; margin-top: 2px; }
.aovivo.liberado {
  border-style: solid;
  border-color: rgba(61, 255, 168, 0.45);
  background: rgba(61, 255, 168, 0.07);
}
.aovivo.liberado .aovivo-ic {
  background: rgba(61, 255, 168, 0.14);
  color: var(--verde);
  animation: aovivo 1.8s ease-in-out infinite;
}
@keyframes aovivo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 255, 168, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(61, 255, 168, 0); }
}

/* historico */
.hist-score {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borda);
}
.hist-score.s-alto { color: var(--verde); border-color: rgba(61, 255, 168, 0.35); }
.hist-score.s-medio { color: var(--ouro); border-color: rgba(255, 200, 61, 0.35); }
.hist-score.s-baixo { color: #ff9aa5; border-color: rgba(255, 92, 108, 0.35); }
.estrelinhas { color: var(--ouro); letter-spacing: 1px; }

/* ---------- catalogo ---------- */
.lista-musicas {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.musica { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.musica-topo { display: flex; align-items: center; gap: 12px; }
.musica-capa {
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 320) 90% 58%), hsl(calc(var(--h, 320) + 55) 85% 40%));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 18px rgba(0, 0, 0, 0.3);
}
.musica-info { min-width: 0; flex: 1; }
.musica-info h3 {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.musica-meta {
  color: var(--texto-3);
  font-size: 0.86rem;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.musica-trecho {
  color: var(--texto-3);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 2px;
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-fav { color: var(--texto-3); }
.btn-fav.ativo {
  color: var(--magenta);
  border-color: rgba(255, 61, 154, 0.45);
  background: rgba(255, 61, 154, 0.12);
}
.btn-fav.ativo .ic { fill: currentColor; }
.btn-fav.pop .ic { animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop {
  0% { transform: scale(0.6); }
  100% { transform: scale(1); }
}
.musica-base {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.licenca {
  display: block;
  flex: 1 1 100%;
  max-width: 100%;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 5px 10px;
  border-radius: 10px;
  color: rgba(61, 224, 255, 0.92);
  border: 1px solid rgba(61, 224, 255, 0.26);
  background: rgba(61, 224, 255, 0.05);
  overflow-wrap: anywhere;
}
.melhor { color: var(--texto-3); font-size: 0.86rem; }
.melhor b { color: var(--ouro); font-size: 1rem; font-variant-numeric: tabular-nums; }
.btn-cantar { margin-left: auto; min-height: 48px; padding: 10px 18px; }
.btn-cantar .ic { width: 18px; height: 18px; fill: currentColor; stroke: none; }

/* ---------- casa: a lista de músicas abre o app (sem login) ---------- */
.topo-casa { gap: 12px; }
/* a marca das boas-vindas, em miniatura e sem o pulso (o topo fica calmo) */
.logo-marca.logo-mini {
  width: 52px;
  height: 52px;
  flex: none;
  margin: 0;
  animation: none;
  box-shadow: 0 0 0 4px rgba(203, 161, 58, 0.12), 0 10px 26px rgba(203, 161, 58, 0.32);
}
.logo-casa {
  display: inline-block; /* o degradê cobre só a palavra (igual ao logo grande) */
  max-width: 100%;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: var(--grad-marca);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* "Modo automático": botão grande dourado (a cor do vinil), logo abaixo da busca */
.btn-automatico {
  width: 100%;
  min-height: 72px;
  justify-content: flex-start;
  gap: 14px;
  padding: 12px 16px;
  text-align: left;
  color: #1b1200;
  background: linear-gradient(135deg, #ffd96b 0%, #cba13a 100%);
  box-shadow: 0 12px 28px rgba(203, 161, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-automatico:hover { filter: brightness(1.05); }
.btn-automatico .auto-ic {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(27, 18, 0, 0.14);
}
.btn-automatico .auto-ic .ic { width: 24px; height: 24px; stroke-width: 2.2; }
.auto-textos { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.auto-textos b { font-size: 1.12rem; font-weight: 900; line-height: 1.15; }
.auto-textos small { font-size: 0.86rem; font-weight: 700; line-height: 1.25; color: rgba(27, 18, 0, 0.72); }
.btn-automatico .auto-seta { width: 20px; height: 20px; opacity: 0.7; }

/* ---------- cartão de modo (Festa: "Comandar uma festa"). O Início mora em css/inicio.css ---------- */
.cartao-modo {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 18px 16px; margin-bottom: 14px;
  border-radius: var(--raio); border: 1px solid var(--borda-2);
  background: var(--card); color: var(--texto); cursor: pointer;
  transition: filter .15s ease, transform .06s ease;
}
.cartao-modo:active { transform: translateY(1px); }
.cartao-modo:hover { filter: brightness(1.06); }
.cartao-modo .modo-ic { width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center; }
.cartao-modo .modo-ic .ic { width: 26px; height: 26px; stroke-width: 2.1; }
.modo-textos { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.modo-textos b { font-size: 1.2rem; font-weight: 900; line-height: 1.15; }
.modo-textos small { font-size: 0.9rem; line-height: 1.3; color: var(--texto-2); }
.cartao-modo .modo-seta { width: 20px; height: 20px; opacity: .55; flex: none; }
.modo-festa { background: linear-gradient(120deg, rgba(255,200,61,.16), rgba(255,200,61,.03)); border-color: rgba(255,200,61,.42); }
.modo-festa .modo-ic { background: rgba(255,200,61,.2); color: var(--ouro); }

/* ---------- tela entrar (login leve): o PALCO mora em css/entrar-palco.css ---------- */
/* "Já cantou neste celular" e "Já usei o Kobalski em outro aparelho" (21/10/2026: o perfil não se perde) */
.entrar-local-foto { width: 42px; height: 42px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid var(--borda-2); }
.entrar-local-foto .eu-ini { font-size: 1.05rem; }
.item-botao-destaque b { color: var(--ouro); }
#form-outro-aparelho { margin-top: 6px; }
/* avatar "normal": foto (cover) ou inicial numa cor (mesmo gradiente das capas do catálogo) */
.eu-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eu-ini {
  width: 100%; height: 100%; display: grid; place-items: center; color: #fff; font-weight: 900;
  background: linear-gradient(135deg, hsl(var(--h, 320) 90% 58%), hsl(calc(var(--h, 320) + 55) 85% 40%));
}
.eu-previa { width: 62px; height: 62px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid var(--borda-2); }
.eu-previa .eu-ini { font-size: 1.55rem; }
/* tela Minha conta */
.eu-card { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.eu-grande { width: 66px; height: 66px; flex: none; border-radius: 50%; overflow: hidden; border: 1px solid var(--borda-2); }
.eu-grande .eu-ini { font-size: 1.7rem; }
/* a bolinha é o botão de trocar a foto (com a câmera no canto) */
.eu-foto-btn { appearance: none; position: relative; flex: none; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; color: inherit; }
.eu-foto-btn .eu-grande { width: 76px; height: 76px; display: block; }
.eu-foto-btn:active { transform: scale(.97); }
.eu-foto-cam {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; color: var(--texto);
  background: #241a33; border: 1.5px solid var(--borda-2); box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
html.edicao-embaixador .eu-foto-cam { background: #2a1a0e; border-color: rgba(226, 176, 74, .7); }
.eu-foto-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.eu-foto-link {
  appearance: none; cursor: pointer; min-height: 44px; padding: 0 16px; border-radius: 999px;
  font: inherit; font-size: 0.98rem; font-weight: 800; color: var(--texto);
  background: rgba(255, 255, 255, .08); border: 1.5px solid var(--borda-2);
}
.eu-foto-link:active { transform: scale(.97); }
.eu-foto-tirar { color: var(--texto-2); font-weight: 700; }
.eu-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.eu-nome { font-size: 1.3rem; font-weight: 800; }
.eu-id { color: var(--texto-3); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
/* "Usar em outro celular": o ID e o código grandes, pra ler e ditar */
.eu-outro { margin-bottom: 16px; }
.eu-chaves { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.eu-chave { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--borda-2); background: rgba(0, 0, 0, 0.18); }
.eu-chave small { color: var(--texto-3); font-size: 0.78rem; }
.eu-chave b { font-size: 1.35rem; font-weight: 900; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eu-outro-botoes { display: flex; flex-wrap: wrap; gap: 8px; }
.eu-outro-botoes .btn { flex: 1 1 140px; }

/* ---------- hub da festa: comandar / entrar ---------- */
.entrar-festa-card { margin-top: 4px; }
.entrar-festa-titulo { font-size: 1.1rem; font-weight: 800; margin: 0 0 4px; }
.entrar-festa-form { display: flex; gap: 10px; margin: 10px 0 2px; }
.codigo-festa { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.25em; font-weight: 800; text-align: center; font-size: 1.2rem; }
.codigo-festa::placeholder { letter-spacing: 0.25em; font-weight: 700; }
.entrar-festa-form .btn { flex: none; }

/* chip de ritmo/andamento ("Samba · 100 bpm" ou só "100 bpm"); cor pela energia da base */
.chip-ritmo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 9px 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--texto-2);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--borda);
}
.chip-ritmo::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--texto-3);
}
.chip-ritmo.alta { color: #ffd97a; border-color: rgba(255, 200, 61, 0.35); background: rgba(255, 200, 61, 0.09); }
.chip-ritmo.alta::before { background: var(--ouro); box-shadow: 0 0 8px rgba(255, 200, 61, 0.7); }
.chip-ritmo.media { color: #ff8cc2; border-color: rgba(255, 61, 154, 0.35); background: rgba(255, 61, 154, 0.08); }
.chip-ritmo.media::before { background: var(--magenta); }
.chip-ritmo.calma { color: var(--ciano); border-color: rgba(61, 224, 255, 0.3); background: rgba(61, 224, 255, 0.06); }
.chip-ritmo.calma::before { background: var(--ciano); }

/* ---------- palco ---------- */
.tela-palco { gap: 12px; }
.aviso-fone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(61, 224, 255, 0.07);
  border: 1px solid rgba(61, 224, 255, 0.25);
  color: var(--texto-2);
  font-size: 0.88rem;
}
.aviso-fone .ic { width: 26px; height: 26px; color: var(--ciano); }
.aviso-fone b { color: var(--texto); }

.alerta {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 92, 108, 0.1);
  border: 1px solid rgba(255, 92, 108, 0.4);
  animation: entrar 0.3s ease;
}
.alerta > .ic { width: 22px; height: 22px; color: var(--vermelho); margin-top: 1px; }
.alerta strong { display: block; color: #ffc0c6; margin-bottom: 2px; }
.alerta p { color: var(--texto-2); font-size: 0.9rem; }

.placar-vivo {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}
.placar-num { display: flex; align-items: baseline; gap: 8px; }
.placar-num span {
  font-size: clamp(3.4rem, 19vw, 4.8rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 30%, #ffc2df 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: filter 0.25s ease;
}
.placar-num small {
  color: var(--texto-3);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.placar-vivo.quente .placar-num span { filter: drop-shadow(0 0 14px rgba(61, 255, 168, 0.55)); }
.placar-lado { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--borda);
  color: var(--texto-2);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.status-chip.ok { background: rgba(61, 255, 168, 0.16); border-color: rgba(61, 255, 168, 0.5); color: var(--verde); }
.status-chip.ajuste { background: rgba(255, 200, 61, 0.14); border-color: rgba(255, 200, 61, 0.45); color: var(--ouro); }
.status-chip.cante { background: rgba(255, 61, 154, 0.14); border-color: rgba(255, 61, 154, 0.45); color: #ff8cc2; }
.nota-voz { display: flex; align-items: baseline; gap: 6px; }
.nota-voz small { color: var(--texto-3); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.nota-voz b {
  font-family: var(--mono);
  font-size: 1.15rem;
  min-width: 3.4em;
  text-align: right;
  color: var(--ciano);
}

.pista-wrap {
  position: relative;
  height: clamp(240px, 44vh, 420px);
  border-radius: var(--raio);
  overflow: hidden;
  border: 1px solid var(--borda);
  background:
    radial-gradient(120% 90% at 25% 50%, rgba(255, 61, 154, 0.1), transparent 60%),
    rgba(4, 2, 10, 0.55);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.45);
  transition: height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tela-palco.cantando .pista-wrap { height: clamp(280px, 56vh, 540px); }
#pista {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.pista-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  background: rgba(11, 6, 20, 0.66);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: opacity 0.35s ease;
}
.tela-palco.cantando .pista-overlay { opacity: 0; pointer-events: none; }
.overlay-card { max-width: 30ch; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.overlay-ic {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: rgba(61, 224, 255, 0.12);
  color: var(--ciano);
  margin-bottom: 4px;
}
.overlay-ic .ic { width: 30px; height: 30px; }
.overlay-titulo { font-size: 1.25rem; font-weight: 900; }
.overlay-texto { color: var(--texto-2); font-size: 0.92rem; }

.controles { display: flex; flex-direction: column; gap: 10px; }
.tela-palco.cantando .aviso-fone { display: none; }

/* preparação (contagem 10..1): a pista vira botão de pular e o "Pular a contagem" aparece */
.tela-palco.contagem #pista { cursor: pointer; }
.btn-pular { border-style: dashed; }
.btn-pular .ic { width: 18px; height: 18px; }
.tela-palco.contagem .btn-pular { animation: entrar 0.25s ease; }

/* PAUSA no palco: "Pausar" e "Recomeçar" lado a lado (na coluna do celular não ganha fileira nova) */
.controles-fileira { display: flex; gap: 10px; }
.controles-fileira > .btn { flex: 1 1 0; min-width: 0; }
.btn-pausa .ic { width: 20px; height: 20px; }
/* a pista parada ganha o aviso por cima (dá pra ler de longe, na TV); tocar nele continua */
.pista-pausa {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(11, 6, 20, 0.45);
  animation: entrar 0.2s ease;
}
.pista-pausa-cartao {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(11, 6, 20, 0.8);
  color: var(--texto, #fff);
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 26px;
}
.pista-pausa-cartao .ic { width: 40px; height: 40px; color: var(--ciano); }
.pista-pausa-titulo { font-size: 1.5rem; font-weight: 900; letter-spacing: 0.02em; }
.pista-pausa-texto { color: var(--texto-2); font-size: 0.9rem; }

.ajustes { display: flex; flex-direction: column; gap: 14px; }
.ajuste-nome { display: flex; flex-direction: column; font-weight: 700; }
.ajuste-nome small { color: var(--texto-3); font-weight: 500; font-size: 0.82rem; }

.ajuste { display: flex; flex-direction: column; gap: 2px; }
.ajuste-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

/* auxilio: seletor segmentado 0-3 */
.ajuste-auxilio { gap: 6px; }
.segmentos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 6px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--borda);
}
/* travado durante a musica: apaga so os NAO escolhidos; o que esta valendo continua nitido
   (antes o container a 0,55 x o span a 0,6 deixava o escolhido em 0,33 = quase sumia) */
.segmentos.travado .segmento input:not(:checked) + span { opacity: 0.45; }
.segmento { position: relative; display: flex; min-width: 0; }
.segmento input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.segmento span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 6px 3px;
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.12;
  color: var(--texto-2);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}
.segmento span small {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--texto-3);
}
.segmento input:active + span { transform: scale(0.96); }
.segmento input:checked + span {
  color: #fff;
  background: rgba(255, 61, 154, 0.22);
  box-shadow: inset 0 0 0 1px var(--magenta), 0 4px 14px rgba(255, 61, 154, 0.22);
}
.segmento input:checked + span small { color: var(--ciano); }
.segmento input:focus-visible + span { outline: 2px solid var(--ciano); outline-offset: 2px; }
.segmento input:disabled { cursor: default; }
.auxilio-dica { min-height: 1.2em; }
.auxilio-dica b { color: var(--ciano); font-family: var(--mono); font-weight: 800; }
.ajuste-topo output {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--ciano);
  font-size: 0.92rem;
  /* nada de nowrap: um rótulo longo quebra linha em vez de estourar a largura do celular */
  white-space: normal;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}
.ajuste-dica { color: var(--texto-3); font-size: 0.8rem; }
.ajuste-travado {
  color: var(--ouro);
  font-size: 0.82rem;
  background: rgba(255, 200, 61, 0.08);
  border: 1px solid rgba(255, 200, 61, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
}

/* slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 48px; /* alvo de toque; a trilha fica centrada e o thumb e relativo a ela */
  margin: 2px 0 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}
input[type="range"]:focus { outline: none; }
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta) 0 var(--p, 50%), rgba(255, 255, 255, 0.15) var(--p, 50%) 100%);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -10px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 61, 154, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--ciano), 0 2px 8px rgba(0, 0, 0, 0.45); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.15); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--magenta); }
input[type="range"]::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 61, 154, 0.35), 0 2px 8px rgba(0, 0, 0, 0.45);
}
input[type="range"]:disabled { opacity: 0.45; cursor: default; }

/* ---------- resultado ---------- */
.res-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 16px 20px;
  text-align: center;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(255, 61, 154, 0.14), transparent 70%),
    var(--card);
}
.anel {
  --pct: 0;
  width: 188px;
  height: 188px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ciano) 0%, var(--magenta) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.08) calc(var(--pct) * 1%) 100%);
  box-shadow: 0 0 50px rgba(255, 61, 154, 0.25);
}
.anel-miolo {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #2a1248, #140824);
}
.anel-miolo span {
  font-size: 3.8rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.anel-miolo small {
  color: var(--texto-3);
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 4px;
}
.estrelas { display: flex; gap: 6px; margin-top: 4px; }
.estrela {
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.14);
  fill: currentColor;
  stroke: none;
}
.estrela.acesa {
  color: var(--ouro);
  filter: drop-shadow(0 0 8px rgba(255, 200, 61, 0.6));
  animation: estrela 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  animation-delay: calc(var(--i, 0) * 0.12s + 0.5s);
}
@keyframes estrela {
  from { opacity: 0; transform: scale(0) rotate(-45deg); }
  to { opacity: 1; transform: none; }
}
.res-frase { font-size: 1.1rem; font-weight: 800; }
.res-acertos { color: var(--texto-2); font-size: 0.95rem; }
.res-auxilio {
  margin-top: -2px;
  color: var(--texto-3);
  font-size: 0.86rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.res-auxilio b { color: var(--texto-2); font-family: var(--mono); font-weight: 800; }
.res-dica {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ciano);
  background: rgba(61, 224, 255, 0.07);
  border: 1px dashed rgba(61, 224, 255, 0.4);
}
.res-dica .ic { width: 14px; height: 14px; }
.res-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.res-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--borda-2);
  color: var(--texto-2);
}
.res-tag.recorde { color: #1b1200; background: var(--ouro); border-color: var(--ouro); box-shadow: 0 0 18px rgba(255, 200, 61, 0.35); }
.res-tag.teste { color: var(--ciano); border-color: rgba(61, 224, 255, 0.4); background: rgba(61, 224, 255, 0.08); }
.res-tag.falhou { color: #ffb0b8; border-color: rgba(255, 92, 108, 0.45); background: rgba(255, 92, 108, 0.1); }
.res-tag .ic { width: 14px; height: 14px; }
/* sem a reputação do lado: a melhor nota fica sozinha e centrada */
.res-melhor-card { align-items: center; text-align: center; }

.salvo {
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: rgba(61, 255, 168, 0.35);
  background: rgba(61, 255, 168, 0.06);
}
.salvo .ic-salvo {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(61, 255, 168, 0.16);
  color: var(--verde);
}
.salvo .ic-salvo .ic { width: 20px; height: 20px; stroke-width: 2.6; }
.salvo code {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--texto);
  letter-spacing: 0.06em;
}
.salvo.falhou { border-color: rgba(255, 92, 108, 0.4); background: rgba(255, 92, 108, 0.08); }
.salvo.falhou .ic-salvo { background: rgba(255, 92, 108, 0.16); color: var(--vermelho); }
/* modo teste: nao conta pra carreira (aviso neutro, nem verde nem vermelho) */
.salvo.neutro { border-color: rgba(61, 224, 255, 0.35); background: rgba(61, 224, 255, 0.07); color: var(--texto-2); }
.salvo.neutro .ic-salvo { background: rgba(61, 224, 255, 0.14); color: var(--ciano); }

.silabas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.silaba {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--texto-2);
}
.p-bom { background: rgba(61, 255, 168, 0.16); color: #8dffc9; }
.p-meio { background: rgba(255, 200, 61, 0.15); color: #ffd97a; }
.p-ruim { background: rgba(255, 92, 108, 0.15); color: #ff9aa5; }
.legenda {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--texto-3);
  font-size: 0.8rem;
}
.legenda span { display: inline-flex; align-items: center; gap: 6px; }
.ponto { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.ponto.p-bom { background: var(--verde); }
.ponto.p-meio { background: var(--ouro); }
.ponto.p-ruim { background: var(--vermelho); }

/* ---------- toast e falha ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 24px);
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(34, 17, 58, 0.97);
  border: 1px solid var(--borda-2);
  box-shadow: var(--sombra);
  font-weight: 700;
  font-size: 0.94rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.visivel { opacity: 1; transform: translate(-50%, 0); }

.falha-boot {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 6, 20, 0.92);
}
.falha-boot .card { max-width: 420px; background: var(--bg-1); text-align: center; }
.falha-boot strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.falha-boot p { color: var(--texto-2); }
.falha-boot .btn { margin-top: 12px; min-height: 48px; padding-inline: 22px; }
/* "Carregando o Kobalski…" (vigia da abertura no index.html) */
.boot-roda {
  display: block;
  width: 30px;
  height: 30px;
  margin: 2px auto 12px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--magenta);
  animation: boot-gira 0.9s linear infinite;
}
.boot-roda[hidden] { display: none; }
@keyframes boot-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .boot-roda { animation-duration: 2.4s; } }

/* ---------- telas maiores ---------- */
@media (min-width: 720px) {
  #app { padding-top: calc(var(--safe-t) + 28px); }
  .pista-wrap { height: clamp(300px, 46vh, 460px); }
}

@media (max-width: 360px) {
  .btn { padding: 12px 14px; }
  .grade-2 { gap: 10px; }
  .stat-valor { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
}

/* Durante a música os ajustes SOMEM e a pista ganha a tela; o botão de ajustes no topo reabre
   (e fecha de novo). Fora da música tudo volta ao normal. */
.btn-ajustes-vivo { display: none; }
.tela-palco.cantando .btn-ajustes-vivo { display: grid; }
.tela-palco.cantando .ajustes { display: none; }
.tela-palco.cantando.ajustes-abertos .ajustes { display: block; }
.tela-palco.cantando.ajustes-abertos .btn-ajustes-vivo { color: var(--ciano); border-color: rgba(61, 224, 255, 0.5); }
.tela-palco.cantando .pista-wrap { height: clamp(300px, 64vh, 680px); }
