*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
* {
  font-family: var(--font-family-default);
}

/* Scroll funcional sin barra visible — global (Firefox, Edge legacy, WebKit) */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-family-default);
  font-size: var(--body-md-size);
  line-height: var(--body-md-line);
  color: var(--content-default);
  background: #e8e8e8;
}

html.is-embed-demo,
html.is-embed-demo body {
  min-height: auto;
  background: var(--background-default);
}

html.is-embed-demo .app-viewport {
  min-height: auto;
  padding: 0;
}

/* Contenedor externo — centra el móvil en desktop */
.app-viewport {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
}

/* Shell móvil iPhone 16 Pro — altura fija; solo scrollea el contenido */
.phone-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--frame-width);
  height: var(--frame-min-height);
  max-height: var(--frame-min-height);
  background: var(--background-page);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.phone-shell__body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

/* Área de scroll — inercia táctil, sin barra visible, saltos suaves */
.phone-shell__scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.phone-shell__content {
  padding-left: var(--content-margin-x);
  padding-right: var(--content-margin-x);
}

/* Cabecera pantalla — Figma: título x=20 w=353, subtítulo x=22 w=353 */
.screen-header {
  padding-top: var(--screen-title-offset-top);
}

.screen-title {
  margin: 0 auto;
  max-width: var(--screen-title-width);
  font-size: var(--heading-lg-size);
  font-weight: var(--heading-lg-weight);
  line-height: var(--heading-lg-line);
  text-align: center;
  color: var(--content-default);
}

.screen-title .accent {
  color: var(--color-brand-600);
}

.screen-subtitle {
  margin: var(--screen-gap-heading-subtitle) auto 0;
  max-width: var(--screen-title-width);
  font-size: var(--body-lg-size);
  font-weight: var(--body-lg-weight);
  line-height: 22px;
  text-align: center;
  color: var(--color-neutral-500);
}

/* Navbar fija */
.phone-shell__navbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  box-sizing: border-box;
  height: var(--navbar-height);
  min-height: var(--navbar-height);
  max-height: var(--navbar-height);
  z-index: 10;
  flex-shrink: 0;
}

.phone-shell__navbar .navbar {
  height: 100%;
}

/* Pantallas del flujo — una visible a la vez */
.screen {
  display: none;
}

.screen.is-active {
  display: block;
}
