/* Voz Yaflox: paleta e estilo do layout Harmony aprovado (mockups 01 a 09) */
:root {
  --coral: #FF8A7A;
  --laranja: #FFB86B;
  --lilas: #B8A4F0;
  --menta: #8FE3C4;
  --azul: #8CC8FF;
  --creme: #FFF4EC;
  --lavanda: #F3E8FF;
  --tinta: #2D2A4A;
  --suave: #6B5B95;
  --discreto: #8A7FB0;
  --branco: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --creme: #1F1C33; --lavanda: #2A2645; --tinta: #F5F2FF; --suave: #CFC6F0; --discreto: #B9B0DA; --branco: #2D2A4A; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: linear-gradient(180deg, var(--creme), var(--lavanda));
  background-color: var(--creme);
  color: var(--tinta);
  font-family: Nunito, 'Trebuchet MS', Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}
.app { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }
.tela { display: flex; flex-direction: column; gap: 16px; }
.tela[hidden], .modal[hidden], [hidden] { display: none !important; }

h1, h2 { margin: 0; font-weight: 800; }
h1 { font-size: 26px; text-align: center; }
h2 { font-size: 20px; margin-top: 8px; }
.titulo { text-align: center; }
.sub, .dica, .rotulo { color: var(--suave); margin: 0; text-align: center; font-size: 15px; }
.rotulo { color: var(--discreto); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: 13px; }

.marca { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 16px 0 8px; }
.marca img { border-radius: 24px; box-shadow: 0 6px 16px rgba(107, 91, 149, .2); }

.cartao {
  background: var(--branco);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(107, 91, 149, .15);
  display: flex; flex-direction: column; gap: 14px;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--discreto); text-transform: uppercase; letter-spacing: .03em; }
label.marcar { flex-direction: row; align-items: center; gap: 10px; text-transform: none; font-size: 15px; color: var(--tinta); font-weight: 700; letter-spacing: 0; }
input, select, textarea {
  font: inherit; font-size: 17px; color: var(--tinta); background: var(--creme);
  border: 2px solid transparent; border-radius: 16px; padding: 12px 14px; width: 100%;
  text-transform: none; letter-spacing: normal;
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--lilas); border-color: var(--lilas); }
input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--coral); }
textarea { resize: vertical; min-height: 140px; }

.botao, .link, .botao.vazado {
  font: inherit; font-weight: 800; font-size: 18px; border: 0; border-radius: 999px;
  padding: 16px 22px; cursor: pointer; text-align: center; text-decoration: none; display: inline-block;
  background: linear-gradient(90deg, var(--coral), var(--laranja)); color: #fff;
  box-shadow: 0 6px 14px rgba(255, 138, 122, .35);
}
.botao:disabled { opacity: .6; cursor: default; }
.botao.vazado { background: #EEE9F7; color: #5B3FB0; box-shadow: none; }
.link { background: none; color: var(--suave); box-shadow: none; font-size: 15px; padding: 10px; text-decoration: underline; }
.acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.acoes .botao { flex: 1; }

.erro { color: #B5472F; font-weight: 700; margin: 0; text-align: center; }
.contador { text-align: right; color: var(--discreto); font-weight: 700; margin: -6px 4px 0; font-size: 14px; }

/* Perfis */
.grade-perfis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.perfil {
  background: var(--branco); border: 0; border-radius: 28px; padding: 20px 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tinta);
  box-shadow: 0 6px 16px rgba(107, 91, 149, .15); font: inherit;
}
.perfil:focus-visible { outline: 3px solid var(--lilas); }
.perfil .avatar, .avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--lilas), var(--azul)); display: grid; place-items: center; color: #fff; font-size: 34px; font-weight: 800; overflow: hidden; }
.perfil strong { font-size: 19px; }
.perfil small { color: var(--discreto); font-weight: 700; }

/* Vozes */
.faixa-vozes { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.voz {
  scroll-snap-align: start; flex: 0 0 132px; background: var(--branco); border: 3px solid transparent; border-radius: 26px;
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font: inherit; color: var(--tinta);
  box-shadow: 0 6px 16px rgba(107, 91, 149, .15);
}
.voz.escolhida { border-color: var(--coral); }
.voz .avatar { width: 70px; height: 70px; font-size: 26px; }
.voz strong { font-size: 16px; }
.voz .apagar { font-size: 13px; color: #B5472F; background: none; border: 0; text-decoration: underline; cursor: pointer; font: inherit; }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* Recados */
.lista-recados { display: flex; flex-direction: column; gap: 12px; }
.recado { background: var(--branco); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 6px 16px rgba(107, 91, 149, .12); }
.recado p { margin: 0; }
.recado .meta { color: var(--discreto); font-size: 14px; font-weight: 700; }
.recado audio { width: 100%; }
.chip { display: inline-block; align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: #D6F5E8; color: #2E7D5B; font-weight: 800; font-size: 13px; }
.chip.espera { background: #FFD6CC; color: #B5472F; }
.chip.erro { background: #EEE9F7; color: #6B5B95; }

/* Progresso */
.progresso { flex-direction: row; align-items: center; gap: 18px; }
.anel { width: 120px; height: 120px; flex: 0 0 120px; transform: rotate(-90deg); }
.anel-fundo { fill: none; stroke: #F1E9FA; stroke-width: 12; }
.anel-progresso { fill: none; stroke: url(#gradiente-anel); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 302 302; stroke-dashoffset: 302; transition: stroke-dashoffset .6s ease; }
.texto-progresso { display: flex; flex-direction: column; gap: 4px; }
.texto-progresso strong { font-size: 30px; }
.texto-progresso span { color: var(--suave); font-weight: 700; }

/* Joguinho */
.jogo { gap: 8px; }
.jogo canvas { width: 100%; height: auto; aspect-ratio: 640 / 200; border-radius: 18px; background: linear-gradient(180deg, #E9F6FF, #FFFFFF); touch-action: none; user-select: none; -webkit-user-select: none; display: block; }
.dica-jogo { font-weight: 700; color: var(--suave); font-size: 14px; margin: 0; }
.pontos { text-align: right; margin: 0; font-weight: 800; color: var(--tinta); font-size: 14px; }

.pronto { align-items: center; text-align: center; border: 3px solid var(--menta); }
.pronto-titulo { font-size: 22px; font-weight: 800; margin: 0; }
.pronto audio { width: 100%; }
.pronto .acoes { width: 100%; }

.modal { position: fixed; inset: 0; background: rgba(45, 42, 74, .35); display: grid; place-items: center; padding: 16px; z-index: 10; }
.modal-cartao { max-width: 420px; width: 100%; }
.modal-cartao h2 { margin: 0; }

@media (max-width: 420px) {
  .grade-perfis { gap: 10px; }
  .progresso { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .anel-progresso { transition: none; } }
