/* Shared phone layout. Keep the original theme and sizes of the mobile UI. */
@media (max-width: 760px) {
  html,
  html[data-jmc-theme] body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  /* These fields already have their own background, border and padding. */
  #catalog-query,
  #jmcSkinName,
  #playerInput,
  #jmcQuickInput {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .catalog-view-switch,
  #jmcGalleryViewSwitch,
  #catalog-import > label,
  .jmc-skin-layout > *,
  .profile-main,
  .qr-card,
  .editor-page .workspace > .panel,
  .editor-page .canvas-frame,
  .jmc-favorite-download {
    min-width: 0;
    max-width: 100%;
  }

  #jmcGalleryViewSwitch > button {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #catalog-import input,
  #catalog-import select,
  .qr-art,
  #qrImage {
    max-width: 100%;
  }

  .jmc-head-give-code,
  .profile-url,
  .jmc-analysis-panel .stats > p {
    overflow-wrap: anywhere;
  }

  .jmc-favorite-download > .jmc-game-favorite {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .jmc-offline-cards {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .jmc-download-dialog {
    max-height: calc(100vh - 36px);
    max-height: calc(100dvh - 36px);
  }

  .jmc-download-head > div,
  .jmc-download-info > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}
