/* Shared mobile-app layout helpers — purple & white, safe areas, touch targets */

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

body.mobile-app-body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

/* Child portal: one flex column; inner panes scroll (see kid-theme.css). */
body.mobile-app-body.child-app-shell {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.mobile-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

.mobile-card {
  background: var(--card, #fff);
  border: 1.5px solid var(--card-border, #ece8f5);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: 0 8px 28px rgba(109, 93, 252, 0.08);
}

.mobile-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: var(--brand-primary, #6d5dfc);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.mobile-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  border: 1.5px solid var(--brand-primary, #6d5dfc);
  border-radius: 14px;
  background: #fff;
  color: var(--brand-primary, #6d5dfc);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 480px) {
  .cta-row {
    grid-template-columns: 1fr !important;
  }

  .page-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .setup-steps {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .setup-steps li {
    flex-direction: row !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  body.home-page .setup-steps {
    flex-direction: column !important;
  }
}

@media (max-width: 768px) {
  .shell,
  .shell.wide {
    max-width: 100%;
    padding: calc(12px + var(--safe-top, 0px)) 16px calc(20px + var(--safe-bottom, 0px));
  }

  .card {
    padding: 20px 16px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(109, 93, 252, 0.1);
  }

  .brand h1 {
    font-size: 1.35rem;
  }

  .vadi-theme-toggle {
    top: calc(10px + var(--safe-top, 0px));
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .grid {
    grid-template-columns: 1fr !important;
  }
}
