/* Keep all editor sections reachable without a nested horizontal scroller. */
@media (max-width: 1023px) {
  html.editor-page-active,
  body.editor-page-active {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .editor-page {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .editor-page .editor-shell,
  .editor-page .editor-layout,
  .editor-page .editor-content {
    height: auto;
    overflow: visible !important;
  }

  .editor-page .editor-shell > header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(20, 24, 32, .94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .editor-page .editor-layout > aside {
    width: 100%;
    overflow: visible !important;
    touch-action: pan-y;
  }

  .editor-page .editor-layout > aside > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: .25rem;
  }

  .editor-page .editor-layout > aside button {
    min-width: 0;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
    text-align: center;
    justify-content: center;
  }

  .editor-page .editor-content {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 639px) {
  .editor-page .editor-layout > aside > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
