:root {
  --verde: #283730;
  --verde-fundo: #1b2620;
  --creme: #f3ecd4;
  --creme-suave: rgba(243, 236, 212, 0.62);
  --serif: 'Cormorant Garamond', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: var(--creme);
  font-family: var(--serif);
  cursor: none;
  background: radial-gradient(ellipse at 50% 42%, #34483d 0%, var(--verde) 46%, var(--verde-fundo) 100%);
}

#tela { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }

/* --- pergunta / lema --------------------------------------------------- */
#pergunta {
  position: fixed;
  left: 0; right: 0; top: 4.5vh;
  padding: 0 6vw;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
body[data-modo='telao'] #pergunta {
  font-size: 2.3vmin; font-style: italic; font-weight: 400; color: var(--creme-suave);
}
body[data-modo='totem'] #pergunta { top: 7vh; font-size: 7.2vmin; }
body[data-modo='replay'] #pergunta,
body[data-modo='comparar'] #pergunta { display: none; }

/* --- totem: anel e instruções ------------------------------------------ */
#totem-ui {
  position: fixed; left: 0; right: 0; bottom: 11vh;
  display: none; flex-direction: column; align-items: center; gap: 2.4vmin;
}
body[data-modo='totem'] #totem-ui { display: flex; }
#anel { width: 15vmin; height: 15vmin; }
#anel svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#anel circle { fill: none; stroke-width: 4; stroke-linecap: round; }
#anel .fundo { stroke: rgba(243, 236, 212, 0.16); }
#anel-progresso {
  stroke: var(--creme);
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.25s linear, stroke 0.5s ease;
}
#dica { font-size: 3.4vmin; font-style: italic; color: var(--creme); text-align: center; padding: 0 6vw; }

#privacidade {
  position: fixed; left: 0; right: 0; bottom: 3.2vh;
  display: none; padding: 0 8vw;
  text-align: center; font-size: 1.9vmin; line-height: 1.35; color: var(--creme-suave);
}
body[data-modo='totem'] #privacidade { display: block; }

/* --- rodapé do telão ----------------------------------------------------- */
#rodape {
  position: fixed; left: 4vw; right: 4vw; bottom: 3.2vh;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 3vw;
}
body[data-modo='totem'] #rodape { display: none; }

#contador { display: flex; align-items: baseline; gap: 1.2vmin; }
#contador-n { font-size: 6.4vmin; font-weight: 500; line-height: 1; }
#contador-rotulo { font-size: 2vmin; font-style: italic; color: var(--creme-suave); }

#legenda { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8vmin 2.6vmin; justify-content: center; }
#legenda li { display: flex; align-items: center; gap: 0.9vmin; font-size: 2vmin; color: var(--creme-suave); }
#legenda i { width: 1.5vmin; height: 1.5vmin; border-radius: 50%; display: inline-block; }
#legenda b { font-weight: 500; color: var(--creme); }

#credito { font-size: 1.6vmin; font-style: italic; color: rgba(243, 236, 212, 0.42); text-align: right; }

body[data-modo='replay'] #legenda,
body[data-modo='replay'] #credito,
body[data-modo='comparar'] #rodape { display: none; }
body[data-modo='replay'] #rodape { justify-content: center; }

/* --- comparar ------------------------------------------------------------ */
#comparar { position: fixed; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
#comparar[hidden] { display: none; }
#comparar figure { position: relative; }
#comparar canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#comparar figcaption {
  position: absolute; left: 0; right: 0; bottom: 4vh;
  text-align: center; font-size: 3vmin; font-style: italic; color: var(--creme);
}
body[data-modo='comparar'] #tela { display: none; }

/* --- aviso ----------------------------------------------------------------- */
#aviso {
  position: fixed; left: 50%; bottom: 18vh;
  transform: translateX(-50%);
  padding: 2vmin 4vmin; border-radius: 3vmin;
  background: rgba(27, 38, 32, 0.78); backdrop-filter: blur(6px);
  border: 1px solid rgba(243, 236, 212, 0.18);
  font-size: 3.6vmin; font-style: italic; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.8s ease;
}
#aviso.visivel { opacity: 1; }

/* --- selo de demonstração (página pública da VPS) ------------------------- */
#selo {
  position: fixed; top: 2.6vh; right: 3vw;
  padding: 0.8vmin 2vmin; border-radius: 2vmin;
  border: 1px solid rgba(243, 236, 212, 0.28);
  font-size: 1.7vmin; font-style: italic; letter-spacing: 0.04em;
  color: var(--creme-suave); background: rgba(27, 38, 32, 0.55);
}
#selo[hidden] { display: none; }
