/* The viewport owns chrome; only explicit content/workspace regions scroll. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

.app-shell {
  position: fixed;
  inset: 0;
  height: var(--ntrv-visual-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}

.screen,
.editor-shell,
.preview-shell,
.launch,
.auth {
  height: 100%;
  min-height: 0;
}

.screen {
  overflow: hidden;
  padding-bottom: calc(84px + max(24px, var(--safe-bottom)));
}

.screen > .content {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-chrome,
.picker-actions {
  flex: 0 0 auto;
}

.page-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 16px;
}

.screen .picker-actions {
  position: static;
  margin: 12px 0 0 !important;
  padding-inline: 0 !important;
  padding-bottom: 0 !important;
}

/* The dock floats over content and must follow Safari's visible viewport,
   independently of temporary app-shell height changes. */
.bottom-nav {
  position: fixed;
}

.editor-shell,
.preview-shell {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.editor-workspace {
  min-width: 0;
  overflow: hidden;
}

.canvas-scroller {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overscroll-behavior: contain;
}

.editor-toolbar {
  min-height: 76px;
  overscroll-behavior: contain;
}

.sheet-backdrop {
  position: absolute;
}

.sheet {
  max-height: min(72%, 600px);
  overscroll-behavior: contain;
}

.auth {
  overscroll-behavior: contain;
  scroll-padding-bottom: 24px;
}

.search input,
.control textarea,
.control select {
  font-size: 16px;
}

.nav-item .nav-icon {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.nav-item.active .nav-icon {
  stroke-width: 2.3;
}

.nav-item.active .nav-home {
  fill: currentColor;
}

.nav-item.new .nav-icon {
  width: 29px;
  height: 29px;
  stroke-width: 2.4;
}

@media (min-width: 980px) {
  .editor-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .editor-toolbar {
    min-height: 0;
  }
}
