:root {
  --creme: #FFFBF3;
  --tinta: #2b2724;
  --rosa: #F48591;
  --coral: #FA8D85;
  --sombra: rgba(43, 39, 36, .14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100dvh;
  background: var(--creme);
  color: var(--tinta);
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 400;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

#cena {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  display: block;
  touch-action: none;
  cursor: grab;
}
#cena:active { cursor: grabbing; }

.topo {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 26px);
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.marca {
  font-size: 19px;
  letter-spacing: .34em;
  text-transform: uppercase;
  opacity: .62;
}

.rodape {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.dica {
  font-size: 21px;
  letter-spacing: .04em;
  opacity: .5;
  text-align: center;
  transition: opacity .6s ease;
}
.dica.some { opacity: 0; }

/* ---------- botões: só ícone, nada escrito ---------- */
.botoes {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.botao {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(43, 39, 36, .07);
  color: var(--tinta);
  cursor: pointer;
  padding: 0;
  transition: background .35s ease, color .35s ease, transform .25s ease;
}
.botao:hover { transform: translateY(-2px); }
.botao:active { transform: translateY(0) scale(.95); }
.botao.ligada { background: var(--rosa); color: var(--creme); }

.botao svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.botao.grande { width: 78px; height: 78px; margin-top: 6px; }
.botao.grande svg { width: 32px; height: 32px; }

/* o risquinho do mudo só aparece quando a voz está desligada */
.botao .corte { display: none; }
.botao:not(.ligada) .corte { display: block; }
.botao:not(.ligada) .onda { display: none; }

.pilulas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.pilula {
  display: inline-block;
  text-decoration: none;
  font-family: inherit;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .18em;
  white-space: nowrap;
  color: var(--tinta);
  background: rgba(43, 39, 36, .07);
  border: 0;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .25s ease;
}
.pilula:hover { transform: translateY(-2px); }
.pilula:active { transform: translateY(0) scale(.97); }
.pilula.ligada { background: var(--rosa); color: var(--creme); }

.carregando {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--creme);
  font-size: 18px;
  letter-spacing: .16em;
  opacity: .55;
  transition: opacity .7s ease;
  z-index: 5;
}
.carregando.foi { opacity: 0; pointer-events: none; }
.carregando span { animation: respira 2.1s ease-in-out infinite; }

@keyframes respira {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

/* ---------- página do passo a passo ---------- */
.uso .topo {
  justify-content: space-between;
  padding: 0 22px;
  align-items: center;
}
.uso .topo * { pointer-events: auto; }

.voltar {
  font-size: 26px;
  text-decoration: none;
  color: var(--tinta);
  opacity: .5;
  width: 34px;
}
.voltar:hover { opacity: 1; }

.passo-num {
  font-size: 17px;
  letter-spacing: .22em;
  opacity: .45;
  width: 34px;
  text-align: right;
}

.capa {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  text-align: center;
  background: rgba(255, 251, 243, .82);
  backdrop-filter: blur(7px);
  transition: opacity .6s ease;
}
.capa.foi { opacity: 0; pointer-events: none; }

.capa-titulo {
  font-size: 38px;
  letter-spacing: .06em;
}
.capa-texto {
  font-size: 24px;
  opacity: .6;
  max-width: 30ch;
  line-height: 1.5;
}
.capa-aviso {
  font-size: 18px;
  opacity: .42;
  max-width: 34ch;
  line-height: 1.5;
  margin-top: 8px;
}
.pilula.grande {
  font-size: 15px;
  padding: 16px 40px;
  margin-top: 6px;
}

.legenda {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 104px);
  display: flex;
  justify-content: center;
  padding: 0 52px;
  pointer-events: none;
}
.legenda p {
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: .01em;
  max-width: 30ch;
  text-align: center;
  opacity: 0;
  transition: opacity .35s ease;
}
.legenda p.aparece { opacity: 1; }

/* cada palavra chega junto com a voz */
.palavra {
  display: inline-block;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .28s ease, transform .28s ease;
}
.palavra.veio { opacity: .92; transform: translateY(0); }

/* ---------- página de escolher a voz ---------- */
.escolha { overflow: auto; }

.folha {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 24px calc(env(safe-area-inset-bottom) + 48px);
  text-align: center;
}

.folha-titulo { font-size: 40px; letter-spacing: .04em; }
.folha-texto { font-size: 22px; opacity: .58; }

.vozes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  margin-top: 14px;
  max-width: 640px;
}

.voz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.voz-num { font-size: 24px; opacity: .5; }

.voltar-texto {
  margin-top: 18px;
  font-size: 20px;
  color: var(--tinta);
  opacity: .5;
  text-decoration: none;
}
.voltar-texto:hover { opacity: 1; }

@media (max-width: 700px) {
  .uso .topo { padding: 0 14px; }
  .uso .marca { font-size: 13px; letter-spacing: .16em; }
  .botao { width: 48px; height: 48px; }
  .botao svg { width: 21px; height: 21px; }
  .botao.grande { width: 70px; height: 70px; }
  .botoes { gap: 11px; }
  .legenda { bottom: calc(env(safe-area-inset-bottom) + 132px); padding: 0 34px; }
  .uso .rodape { bottom: calc(env(safe-area-inset-bottom) + 40px); }
  .marca { font-size: 15px; }
  .dica { font-size: 18px; }
  .legenda p { font-size: 23px; max-width: 24ch; }
  .passo-num { font-size: 14px; }
}

@media (min-width: 1024px) {
  .legenda p { font-size: 33px; max-width: 32ch; }
  .capa-titulo { font-size: 54px; }
  .capa-texto { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important; }
}
