/* Colores y medidas de toda la app. Para cambiar el aspecto, se cambia aquí. */
:root {
  --cielo-1: #7FC8F8;
  --cielo-2: #3B6FD9;
  --papel: #FFFBF2;
  --tinta: #2B2540;
  --tinta-suave: #6A6480;
  --coral: #FF6F59;
  --sol: #FFC93C;
  --hoja: #3DBE6E;
  --sombra: 0 6px 0 rgba(43, 37, 64, .16);
  --letra: 'Nunito', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  --letra-titulo: 'Baloo 2', 'Nunito', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--cielo-2);
  color: var(--tinta);
  font-family: var(--letra);
  font-size: 20px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; cursor: pointer; touch-action: manipulation; }
button:focus-visible { outline: 4px solid var(--sol); outline-offset: 3px; }

#app { min-height: 100%; position: relative; overflow: hidden; }
.pantalla {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

/* Fondo de cielo */
.fondo-cielo { background: linear-gradient(180deg, var(--cielo-1), var(--cielo-2)); min-height: 100vh; min-height: 100dvh; }
.pantalla[hidden] { display: none; }
.tarjeta {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  background: var(--papel);
  border-radius: 32px;
  box-shadow: var(--sombra);
  padding: 28px 24px;
  text-align: center;
  animation: aparecer .5s cubic-bezier(.3, 1.4, .5, 1) both;
}
.logo { width: 120px; height: 120px; border-radius: 28%; box-shadow: 0 4px 10px rgba(0, 0, 0, .18); animation: flotar 3s ease-in-out infinite; }
h1 { font-family: var(--letra-titulo); font-size: 44px; line-height: 1.1; margin: 8px 0 0; }
.sub { color: var(--tinta-suave); margin: 4px 0 16px; font-size: 17px; }
.btn {
  min-height: 60px;
  padding: 0 28px;
  border: none;
  border-radius: 20px;
  background: var(--coral);
  color: #fff;
  font-family: var(--letra-titulo);
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 5px 0 #D9503C;
  transition: transform .1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #D9503C; }

.btn { width: 100%; margin-top: 8px; }
.btn-2 { background: #fff; color: var(--tinta); border: 3px solid #E4DCCB; box-shadow: 0 5px 0 #E4DCCB; }
.btn-2:active { box-shadow: 0 2px 0 #E4DCCB; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.enlace { background: none; border: none; color: var(--cielo-2); text-decoration: underline; padding: 12px; font-size: 18px; min-height: 48px; }
.emoji { font-size: 64px; margin: 0; line-height: 1.2; }
.nota { color: var(--tinta-suave); font-size: 16px; }
hr { border: none; border-top: 2px dashed #E4DCCB; margin: 18px 0 6px; }
h2 { font-family: var(--letra-titulo); font-size: 20px; margin: 0 0 8px; }
small { color: var(--tinta-suave); font-weight: 400; }

/* Formularios */
form.tarjeta { text-align: left; }
form.tarjeta h1, form.tarjeta .sub, form.tarjeta .logo, form.tarjeta > p:not(.error):not(.ok) { text-align: center; }
form.tarjeta .logo { display: block; margin: 0 auto; }
label { display: block; font-weight: 700; margin: 14px 0 0; font-size: 18px; }
input[type=email], input[type=password], input[type=text] {
  display: block; width: 100%; margin-top: 6px; min-height: 56px; padding: 0 16px;
  font: inherit; font-size: 20px; color: var(--tinta);
  border: 3px solid #E4DCCB; border-radius: 16px; background: #fff;
}
input:focus { outline: none; border-color: var(--cielo-2); }
.clave { display: flex; gap: 8px; align-items: stretch; }
.clave input { flex: 1; min-width: 0; }
.ver { margin-top: 6px; width: 56px; border: 3px solid #E4DCCB; border-radius: 16px; background: #fff; font-size: 22px; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 17px; line-height: 1.4; }
label.check input { width: 28px; height: 28px; flex: none; margin: 0; accent-color: var(--hoja); }
.error, .ok { border-radius: 14px; padding: 10px 14px; font-size: 17px; margin: 14px 0 0; text-align: left; }
.error { background: #FFE1DC; color: #9B2C1F; }
.ok { background: #DDF5E5; color: #1E6B3A; }
.caja { background: #F4F0E6; border-radius: 18px; padding: 14px 16px; margin: 16px 0 8px; text-align: left; }
.lista { margin: 0; padding-left: 20px; font-size: 17px; }
.aviso-red { position: fixed; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 5; background: #FFF1CC; color: #7A5200; padding: 6px 14px; border-radius: 20px; font-size: 15px; margin: 0; box-shadow: var(--sombra); }

/* Nubes de fondo */
.nubes { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.nubes i {
  position: absolute;
  width: 180px; height: 60px;
  background: rgba(255, 255, 255, .7);
  border-radius: 60px;
  animation: nube 40s linear infinite;
}
.nubes i::before { content: ""; position: absolute; width: 80px; height: 80px; border-radius: 50%; background: inherit; left: 30px; top: -36px; }
.nubes i:nth-child(1) { top: 10%; animation-delay: -5s; }
.nubes i:nth-child(2) { top: 35%; animation-delay: -22s; transform: scale(.7); }
.nubes i:nth-child(3) { top: 75%; animation-delay: -14s; }

@keyframes aparecer { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes flotar { 50% { transform: translateY(-8px); } }
@keyframes nube { from { left: -220px; } to { left: 110%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
