:root {
  --ntrv-visual-height: 100dvh;
  --ntrv-keyboard-inset: 0px;
}

/*
 * iOS standalone PWAs need the page to remain scrollable while the software
 * keyboard changes the visual viewport. The base stylesheet intentionally
 * locks overscroll for the editor, but doing that globally can leave Auth with
 * no room for WebKit to reveal a focused input.
 */
body {
  overscroll-behavior-y: auto;
}

.editor-shell,
.preview-shell {
  overscroll-behavior: none;
}

.auth {
  box-sizing: border-box;
  height: var(--ntrv-visual-height);
  min-height: var(--ntrv-visual-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  align-items: start;
  scroll-padding-top: max(24px, var(--safe-top));
  scroll-padding-bottom: calc(24px + var(--ntrv-keyboard-inset));
}

.auth-card {
  margin: auto;
  padding-block: 24px;
}

.auth input,
.auth textarea {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: text;
  user-select: text;
  font-size: 16px;
  caret-color: currentColor;
}

html.ntrv-keyboard-visible .auth-card {
  margin-top: 0;
  margin-bottom: 0;
}
