:root {
  --fondo: #f4f4f2; --texto: #1d1d1b; --suave: #6b6b66; --linea: #d8d8d3;
  --boton: #1d1d1b; --boton-texto: #f4f4f2; --error: #a3261b; --bien: #1f6b3a;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #161615; --texto: #ecebe6; --suave: #a3a29c; --linea: #33332f;
    --boton: #ecebe6; --boton-texto: #161615; --error: #f08a7e; --bien: #7fd39a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 32rem; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 16px 32px; }
h1 { font-size: 2rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.suave { color: var(--suave); }
section, details { margin-top: 1.5rem; }
button {
  display: block; width: 100%; margin: .75rem 0 0; padding: .9rem 1rem; border: 0;
  border-radius: 12px; background: var(--boton); color: var(--boton-texto);
  font: inherit; font-weight: 600; cursor: pointer;
}
button[disabled] { opacity: .5; }
button.secundario { background: transparent; color: var(--texto); border: 1px solid var(--linea); }
button.enlace { background: transparent; color: var(--suave); font-weight: 400; }
details { border-top: 1px solid var(--linea); padding-top: 1rem; }
summary { cursor: pointer; color: var(--suave); }
label { display: block; margin-top: .75rem; font-size: .9rem; color: var(--suave); }
input {
  display: block; width: 100%; margin-top: .25rem; padding: .75rem; font: inherit;
  color: var(--texto); background: transparent; border: 1px solid var(--linea); border-radius: 10px;
}
code { font-size: .85em; }
#mensaje { min-height: 1.5em; margin-top: 1.25rem; }
#mensaje.error { color: var(--error); }
#mensaje.bien { color: var(--bien); }
