@media (max-width: 700px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .app-shell {
    display: block;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .app-shell .sidebar,
  .app-shell .list-pane,
  .app-shell .editor-pane {
    display: none;
    width: 100%;
    height: 100dvh;
    min-height: 0;
  }

  .app-shell[data-mobile-screen="notebooks"] .sidebar {
    display: flex;
  }

  .app-shell[data-mobile-screen="notes"] .list-pane,
  .app-shell[data-mobile-screen="editor"] .editor-pane {
    display: flex;
  }

  .sidebar {
    position: static;
    overflow-y: auto;
    padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  }

  .sidebar > .section-title,
  .notebook-list {
    display: flex;
  }

  .notebook-list {
    flex: 1;
    flex-direction: column;
    gap: 5px;
    overflow: visible;
  }

  .notebook-list button {
    min-width: 0;
    min-height: 48px;
  }

  .sidebar-bottom {
    margin-top: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pane-header {
    flex: 0 0 auto;
    height: auto;
    min-height: 76px;
    gap: 8px;
    padding: max(12px, env(safe-area-inset-top)) 12px 10px;
  }

  .pane-title-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
  }

  .pane-title-row h2 {
    overflow: hidden;
    max-width: 44vw;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #showNotebooks,
  #showList {
    min-height: 44px;
  }

  #newNoteMobile {
    min-height: 44px;
    padding: 9px 12px;
  }

  .list-pane {
    overflow: hidden;
    border-right: 0;
    border-bottom: 0;
  }

  .note-list {
    flex: 1;
    min-height: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .note-card {
    min-height: 76px;
  }

  .editor-pane {
    overflow: hidden;
  }

  .editor-header {
    flex: 0 0 auto;
    height: auto;
    min-height: 64px;
    padding: max(8px, env(safe-area-inset-top)) 10px 8px;
  }

  .editor-header > div:first-child {
    display: grid;
    flex: 1;
    grid-template-columns: auto minmax(0, 1fr);
    min-width: 0;
  }

  .note-location {
    display: none;
  }

  .save-state {
    align-self: center;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .editor-header > div:last-child,
  .editor-header > div:last-child button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .editor-area {
    overflow-y: auto;
    padding: 18px 16px max(24px, env(safe-area-inset-bottom));
  }
}
