/* AD Mobile Engine — shell full-screen tipo app */
html[data-mobile-app='true'],
html[data-mobile-app='true'] body {
  margin: 0;
  min-height: var(--me-app-height);
  background: var(--ad-bg, #f8fafc);
}

/* LP: scroll nativo do documento */
html[data-mobile-app='true'] body.ad-mobile-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  min-height: 100%;
}

/* App surfaces: shell com altura fixa */
html[data-mobile-app='true'] body.ad-mobile-app {
  overflow: hidden;
  overscroll-behavior: none;
}

html[data-mobile-app='true'] body.ad-mobile-app .mobile-app-shell {
  min-height: var(--me-app-height);
  max-height: var(--me-app-height);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--me-bottom-bar);
}

html[data-standalone='true'] body.ad-mobile-app .mobile-app-shell {
  padding-top: var(--me-safe-top);
}

html[data-mobile-app='true'] .header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-left: max(var(--me-content-pad-x), var(--me-safe-left));
  padding-right: max(var(--me-content-pad-x), var(--me-safe-right));
}

html[data-mobile-app='true'] .btn-primary,
html[data-mobile-app='true'] .header-login-btn,
html[data-mobile-app='true'] button,
html[data-mobile-app='true'] .lesson-btn {
  min-height: var(--me-touch-min);
}

html[data-mobile-app='true'] input,
html[data-mobile-app='true'] select,
html[data-mobile-app='true'] textarea {
  font-size: 16px;
}

html[data-layout='xs'] .title,
html[data-layout='sm'] .title {
  font-size: 2rem;
  line-height: 1.15;
}

html[data-layout='xs'] .grid-3,
html[data-layout='xs'] .grid-4,
html[data-layout='sm'] .grid-3,
html[data-layout='sm'] .grid-4 {
  grid-template-columns: 1fr;
  gap: 1rem;
}

html[data-layout='md'] .grid-3,
html[data-layout='md'] .grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

html[data-mobile-app='true'] .split-layout,
html[data-mobile-app='true'] .split-layout.reverse {
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 1280px) {
  html[data-mobile-app='true'] body.ad-mobile-app {
    overflow: auto;
  }

  html[data-mobile-app='true'] body.ad-mobile-app .mobile-app-shell {
    max-height: none;
    overflow: visible;
  }
}
