/* A retrospectiva: o presente aberto na sala escura.
   As fotos chegam presas no prendedor e revelam na frente de quem recebe. */

.retro {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  background: var(--noite);
  color: var(--papel);
  overflow: hidden;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.retro__barras { display: flex; gap: 4px; max-width: 520px; width: 100%; margin: 0 auto; }
.retro__barra { flex: 1; height: 2px; border-radius: 1px; background: rgba(242, 236, 228, 0.22); overflow: hidden; }
.retro__barra-cheia {
  display: block; height: 100%;
  background: var(--ouro);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.retro__topo {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 520px; width: 100%; margin: 6px auto 0;
  min-height: 44px;
}
.retro__rotulo { color: var(--suave); }
.retro__acoes-topo { display: flex; gap: 4px; }
.retro__icone {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--papel);
  cursor: pointer;
}
.retro__icone:hover { background: var(--chapa); }
.retro__icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.retro__palco {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.retro__dica { text-align: center; font-size: 14px; color: var(--suave); min-height: 22px; }

.retro__marca-previa {
  position: absolute;
  right: -30px; bottom: 22%;
  padding: 4px 40px;
  background: var(--luz);
  color: var(--noite);
  transform: rotate(-90deg);
  pointer-events: none;
}

/* ---------- Cenas ---------- */

.cena { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }

.cena__selo { color: var(--ouro); }
.cena__titulo { font-size: clamp(40px, 11vw, 60px); line-height: 1.02; max-width: 11ch; }
.cena__palavra { display: inline-block; white-space: nowrap; }
.cena__letra { display: inline-block; }
.cena__abrir { max-width: 300px; margin-top: 8px; }

.retro__foto-area { position: relative; width: min(300px, 76vw); margin-top: 10px; }
.retro__polaroid { transform: rotate(var(--giro, -1.5deg)); transform-origin: 50% 0; padding: 10px 10px 50px; }
.retro__polaroid figcaption { font-size: 31px; bottom: 9px; }
.retro__polaroid .polaroid__foto { aspect-ratio: 4 / 5; }
.retro__foto-area .prendedor { top: -20px; }
.retro__contador { font-size: 13px; color: var(--suave); }

.cena--texto { gap: 20px; padding: 0 8px; }
.cena__rotulo { color: var(--ouro); font-weight: 700; font-size: 15px; }
.cena__mao { font-family: var(--fonte-mao); font-weight: 700; font-size: clamp(34px, 9vw, 46px); line-height: 1.12; padding: 0 0.2em; }
.cena__mao--grande { font-size: clamp(40px, 11vw, 56px); }
.cena__grande { font-family: var(--fonte-titulo); font-size: clamp(32px, 8.5vw, 44px); line-height: 1.12; max-width: 15ch; }
.cena--melhor .polaroid { width: min(170px, 46vw); padding: 6px 6px 8px; transform: rotate(-2deg); }

/* Pedacinhos de papel de foto caindo no desejo pra 2027. */
.confetes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confete { position: absolute; left: 0; top: 0; width: 9px; height: 13px; opacity: 0; }
.confete--0 { background: var(--luz); }
.confete--1 { background: var(--papel); }
.confete--2 { background: #8A766B; }
.confete--3 { background: var(--ouro); }

.retro__carta {
  width: 100%;
  max-height: 58vh;
  overflow-y: auto;
  padding: 24px 22px;
  background: var(--papel);
  color: var(--tinta);
  text-align: left;
  box-shadow: var(--sombra-foto);
  transform: rotate(-1deg);
}
.retro__carta-texto { font-size: 26px; line-height: 1.28; white-space: pre-line; overflow-wrap: anywhere; }
.retro__assinatura { margin-top: 14px; text-align: right; font-size: 27px; font-weight: 700; color: var(--luz-sombra); }

.retro__acoes { width: 100%; max-width: 340px; display: grid; gap: 8px; }
.retro__criar { padding: 12px; font-weight: 700; color: var(--suave); }
.retro__criar:hover { color: var(--papel); }

.retro .sem-foto img { visibility: hidden; }
.retro__aviso-story { min-height: 20px; font-size: 14px; color: var(--suave); text-align: center; }
