/* Ajustes y mejoras sobre el diseño base */
:root { --fonte: "Archivo"; }
html { scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(900px 500px at 50% -10%, #3a1258 0%, transparent 70%),
    var(--fundo);
  background-attachment: fixed;
}
.casca { animation: entrar .28s ease-out; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .casca { animation: none; } html { scroll-behavior: auto; } }

/* En computadora: la app se ve como un teléfono elegante centrado */
@media (min-width: 720px) {
  .casca {
    margin: 24px auto;
    min-height: calc(100dvh - 48px);
    background: var(--fundo);
    border: 1px solid var(--linha);
    border-radius: 32px;
    box-shadow: 0 30px 80px #0008;
    overflow: hidden;
  }
  .nav { left: 50%; right: auto; width: 480px; transform: translateX(-50%); bottom: 24px; border: 1px solid var(--linha); border-radius: 0 0 32px 32px; }
}

/* Barra de progreso del inicio */
.avance { margin: 18px 20px 0; display: flex; flex-direction: column; gap: 8px; }
.avance__barra { height: 8px; border-radius: 99px; background: var(--fundo-3); overflow: hidden; }
.avance__barra div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rosa), var(--rosa-claro)); transition: width .6s ease; }
.avance__txt { display: flex; justify-content: space-between; font-size: 13px; color: var(--lilas); font-weight: 600; }
.avance__txt b { color: #fff; }

.hero { transition: transform .2s; }
.hero:active, .capa:active, .cartao:active { transform: scale(.985); }
.capa, .cartao, .linha { transition: transform .15s, background .15s; }
@media (hover: hover) {
  .cartao:hover { border-color: var(--linha-forte); background: var(--fundo-3); }
  .capa:hover img, .hero:hover img { transform: scale(1.04); }
}
.capa img, .hero img { transition: transform .5s ease; }
.dia { transition: transform .15s; }
.dia--hoy { box-shadow: 0 0 0 3px #ff3d8b55; animation: latir 1.8s ease-in-out infinite; }
@keyframes latir { 50% { box-shadow: 0 0 0 6px #ff3d8b22; } }
@media (prefers-reduced-motion: reduce) { .dia--hoy { animation: none; } }

.nav a { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rosa-claro); outline-offset: 2px; }

/* Visor de PDF */
.visor { margin: 8px 20px 0; border-radius: 18px; overflow: hidden; border: 1px solid var(--linha); background: #fff; height: 70dvh; }
.visor iframe { width: 100%; height: 100%; border: 0; display: block; }
.bono-capa { margin: 8px 20px 0; border-radius: 22px; overflow: hidden; position: relative; aspect-ratio: 4/5; max-height: 420px; }
.bono-capa img { width: 100%; height: 100%; object-fit: cover; }
.acciones { display: flex; flex-direction: column; gap: 10px; margin: 16px 20px 0; }

/* Mensaje flotante */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav) + 20px + env(safe-area-inset-bottom));
  transform: translateX(-50%); z-index: 60;
  background: var(--texto); color: var(--tinta); font-weight: 800; font-size: 15px;
  padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px #0007;
  animation: subir .3s;
}

/* Confeti al completar */
.confeti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confeti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: caer 1.8s ease-in forwards; }
@keyframes caer { to { transform: translateY(110vh) rotate(720deg); opacity: .7; } }

.nota { margin: 24px 20px 0; font-size: 12px; color: var(--apagado); text-align: center; line-height: 1.5; }
.btn--texto { background: none; border: 0; color: var(--lilas); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; padding: 10px; }

/* Títulos grandes que no se salgan en celulares angostos */
.titulo-l { font-size: clamp(30px, 9.5vw, 40px); overflow-wrap: anywhere; }
@media (max-width: 400px) { .titulo-l { font-stretch: 108%; } }
