/* Cabeçalho e barra permanecem na janela; só o centro das prévias rola. */
:root { --preview-nav-height: calc(64px + env(safe-area-inset-bottom, 0px)); }
.phone {
  position: fixed;
  inset-inline: 0;
  top: var(--mobile-app-top, 0px);
  margin-inline: auto;
  width: 100%;
  max-width: 440px;
  height: var(--mobile-app-height, 100dvh);
  max-height: var(--mobile-app-height, 100dvh);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-bottom: var(--preview-nav-height);
  overflow: hidden;
}
.app-header { grid-row: 1; min-width: 0; }
.app-content {
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  touch-action: auto;
}
#app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--mobile-app-top, 0px) + var(--mobile-app-height, 100vh) - var(--preview-nav-height));
  width: 100%;
  max-width: 440px;
  height: var(--preview-nav-height);
  margin-inline: auto;
  padding: 4px 8px env(safe-area-inset-bottom, 0px);
  z-index: 40;
  overflow: hidden;
  touch-action: none;
}
#app-nav button { min-width: 0; min-height: 44px; }
.app-content :is(input, select, textarea) { font-size: 16px; max-width: 100%; min-width: 0; }
