@media (max-width: 720px), (max-width: 940px) and (max-height: 520px) {
  body.has-mobile-shell:not(.is-auth-landing) .meta-header {
    min-height: 0;
    flex: 0 0 auto;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .meta-header > div:first-child {
    min-width: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) .meta-header .muted-text {
    display: block;
    margin-top: 3px;
    line-height: 1.35;
    white-space: normal;
  }

  body.has-mobile-shell:not(.is-auth-landing) .meta-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: 8px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .meta-actions > button,
  body.has-mobile-shell:not(.is-auth-landing) .meta-actions > a {
    width: auto;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }

  body.has-mobile-shell:not(.is-auth-landing) .analysis-workspace {
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
  }

  body.has-mobile-shell:not(.is-auth-landing) #importContent .analysis-controls,
  body.has-mobile-shell:not(.is-auth-landing) #adminContent .analysis-controls,
  body.has-mobile-shell:not(.is-auth-landing) .project-setup-form {
    grid-template-columns: minmax(0, 1fr);
  }

  body.has-mobile-shell:not(.is-auth-landing) #importContent .analysis-field,
  body.has-mobile-shell:not(.is-auth-landing) #importContent .drawer-switch,
  body.has-mobile-shell:not(.is-auth-landing) #adminContent .field-label,
  body.has-mobile-shell:not(.is-auth-landing) #adminContent .compact-input,
  body.has-mobile-shell:not(.is-auth-landing) #adminContent .schema-select {
    width: 100%;
    min-width: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) #importContent .schema-select,
  body.has-mobile-shell:not(.is-auth-landing) #importContent button,
  body.has-mobile-shell:not(.is-auth-landing) #adminContent button,
  body.has-mobile-shell:not(.is-auth-landing) .project-setup-form button,
  body.has-mobile-shell:not(.is-auth-landing) .project-setup-form input {
    min-height: 44px;
  }

  body.has-mobile-shell:not(.is-auth-landing) #importContent .analysis-drop-zone {
    min-height: 156px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 14px;
  }

  body.has-mobile-shell:not(.is-auth-landing) #importContent .analysis-drop-cta {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.has-mobile-shell:not(.is-auth-landing) .meta-wrap,
  body.has-mobile-shell:not(.is-auth-landing) .grid-panel {
    width: 100%;
    max-width: 100%;
    overscroll-behavior-inline: contain;
  }

  body.has-mobile-shell:not(.is-auth-landing) .grid-panel {
    overflow: auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) .tab-strip {
    height: 44px;
    min-height: 44px;
    scrollbar-width: none;
  }

  body.has-mobile-shell:not(.is-auth-landing) .tab-strip::-webkit-scrollbar {
    display: none;
  }

  body.has-mobile-shell:not(.is-auth-landing) .tab {
    height: 44px;
    flex-basis: min(220px, 72vw);
    padding-inline: 12px 8px;
  }

  body.has-mobile-shell:not(.is-auth-landing) #querybar {
    max-height: min(44dvh, 300px);
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) #querybar input,
  body.has-mobile-shell:not(.is-auth-landing) #querybar select,
  body.has-mobile-shell:not(.is-auth-landing) .table-footer input,
  body.has-mobile-shell:not(.is-auth-landing) .table-footer select {
    font-size: 16px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .normal-toolbar,
  body.has-mobile-shell:not(.is-auth-landing) .selection-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  body.has-mobile-shell:not(.is-auth-landing) .command-filter {
    width: 100%;
    min-height: 44px;
    height: auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) .query-actions,
  body.has-mobile-shell:not(.is-auth-landing) .selection-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-left: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) .query-actions > *,
  body.has-mobile-shell:not(.is-auth-landing) .selection-toolbar > button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .query-actions .insert-action-wrap,
  body.has-mobile-shell:not(.is-auth-landing) .query-actions .insert-action-wrap > button {
    width: 100%;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-workspace {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-editor-tabs {
    height: 44px;
    min-height: 44px;
    padding-left: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-editor-tab {
    min-width: min(240px, 76vw);
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-tab-add {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-editor-shell {
    min-height: 260px;
    flex: 0 0 48dvh;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-editor-pane,
  body.has-mobile-shell:not(.is-auth-landing) .sql-highlight,
  body.has-mobile-shell:not(.is-auth-landing) .sql-input {
    min-height: 260px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-highlight,
  body.has-mobile-shell:not(.is-auth-landing) .sql-input {
    padding-inline: 10px;
    font-size: 16px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-results-shell {
    min-height: 280px;
    flex: 0 0 auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-results-bar {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-results-tabs,
  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls {
    width: 100%;
    min-height: 44px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls > * {
    min-width: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls #runSql {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    order: -10;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls .sql-action-cluster {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    overflow-x: auto;
    border-right: 0;
    padding-right: 0;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls .sql-output-actions,
  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls .sql-control-pill {
    width: 100%;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls input,
  body.has-mobile-shell:not(.is-auth-landing) .sql-run-controls select {
    min-height: 44px;
    font-size: 16px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-result-tab,
  body.has-mobile-shell:not(.is-auth-landing) .sql-action-btn,
  body.has-mobile-shell:not(.is-auth-landing) .sql-format-action,
  body.has-mobile-shell:not(.is-auth-landing) .sql-run-button,
  body.has-mobile-shell:not(.is-auth-landing) #runSql {
    min-width: 44px;
    min-height: 44px;
  }

  body.has-mobile-shell:not(.is-auth-landing) .sql-results-tabs {
    overflow-x: auto;
  }

  body.has-mobile-shell:not(.is-auth-landing) .table-footer {
    max-height: min(32dvh, 220px);
    display: block;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.has-mobile-shell:not(.is-auth-landing) .footer-pagination,
  body.has-mobile-shell:not(.is-auth-landing) .table-footer .view-tabs {
    width: max-content;
    min-height: 44px;
    flex-wrap: nowrap;
  }

  body.has-mobile-shell:not(.is-auth-landing) .footer-icon-btn,
  body.has-mobile-shell:not(.is-auth-landing) .footer-btn,
  body.has-mobile-shell:not(.is-auth-landing) .footer-select,
  body.has-mobile-shell:not(.is-auth-landing) .page-number,
  body.has-mobile-shell:not(.is-auth-landing) .view-tab {
    min-width: 44px;
    min-height: 44px;
  }
}
