*, *::before, *::after { box-sizing: border-box; }

/* El atributo [hidden] debe ganar siempre, incluso sobre reglas con
   selector de ID (como #app) que fijan su propio "display". */
[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--font-base);
  -webkit-tap-highlight-color: transparent;
}

body {
  /* Respeta el notch / safe areas de iPhone */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior-y: none;
}

h1, h2, h3, p {
  margin: 0;
}

button, input, textarea, select {
  font-family: inherit;
}

img {
  max-width: 100%;
  display: block;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-fondo);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
