/* /v11/css/base.css — base sólida, estable, sin saltos ni scroll indeseado */

/* Reset mínimo */
*,
*::before,
*::after {
  margin:0;
  padding:0;
  box-sizing:border-box;
}

/* Documento */
html {
  font-size:16px;

  /* Altura real en cualquier navegador */
  height:100%;
  min-height:100%;
  min-height:100vh;            /* estándar */
  min-height:100svh;           /* iOS / modernos */
  min-height:-webkit-fill-available;

  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scrollbar-gutter: stable;
}

/* Página */
body {
  width:100%;

  /* Altura blindada contra Safari iOS */
  min-height:100%;
  min-height:100vh;
  min-height:100svh;
  min-height:-webkit-fill-available;

  font-family: var(--font-main);

  background: var(--bg-color);
  color: var(--text-color);

  display:flex;
  flex-direction:column;
  align-items:center;

  overflow-x:hidden;
  /* ESCENCIAL: evita rebotes tipo rubber-band en iOS */
  overscroll-behavior-y:none;

  padding-bottom:0;

  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;

  color-scheme: inherit;
}

/* Transición solo cuando se está cambiando de tema (html.theme-transitioning) */
html.theme-transitioning body {
  transition: background-color .25s ease, color .25s ease;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  body { transition:none !important; }
}
