/* ============================================================
   Base / reset
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1c1c1e;
  /* Evita el rebote/overscroll que dejaba ver el fondo por debajo en iOS. */
  overscroll-behavior-y: none;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Fondo del body segun la pantalla (evita franjas de otro color en las zonas
   seguras). Se elige con la clase que pone el header segun colorScheme. */
body.theme-light {
  background: #fdf7f8;
}

body.theme-dark {
  background: #fde7ee;
}

/* ============================================================
   Contenedor de pantalla (patron estandar de PWA)
   Cada vista usa .login-screen o .home-screen. El alto se resuelve con
   min-height: 100vh (en la PWA instalada equivale a la pantalla completa y es
   estable al abrir en iOS, a diferencia de dvh/JS). Sin position:fixed.
   ============================================================ */
.login-screen,
.home-screen {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
