@media screen and (min-width: 981px) {
  .isMobile:not(.isDesktop),
  .isTablet:not(.isDesktop) {
    display: none !important;
  }
}

@media screen and (max-width: 1180px) {
  .listing-card-list.listing-grid,
  .book-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 980px) {
  :root {
    --sticky-page-top: 78px;
  }

  .app-topbar .wrapper {
    padding-left: 0;
  }

  .topbar-shell {
    border-radius: 20px;
  }

  .second-shelf-layout {
    display: block;
  }

  .second-shelf-main-area {
    grid-column: auto;
  }

  body:after {
    display: none;
  }

  .app-sidebar {
    height: auto;
    left: auto;
    margin-bottom: 24px;
    position: static;
    top: auto;
    width: 100%;
  }

  .app-sidebar:before,
  .app-sidebar:after {
    display: none;
  }

  .app-sidebar-inner {
    border-radius: 20px;
    height: auto;
    padding: 20px;
  }

  .sidebar-logo {
    margin: 0 0 18px;
  }

  .sidebar-menu,
  .sidebar-menu-muted {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-menu-muted {
    margin-top: 16px;
  }

  .home-discover {
    margin-top: 0;
  }

  .form-horizontal .control-label,
  .form-horizontal .controls {
    float: none;
    text-align: left;
    width: 100%;
  }

  .form-horizontal .actions,
  .form-horizontal .pblbt,
  .form-horizontal .recpt,
  .item-post h2 {
    margin-left: 0;
  }
}

@media screen and (min-width: 768px) and (max-width: 980px) {
  .isDesktop:not(.isTablet),
  .isMobile:not(.isTablet) {
    display: none !important;
  }
}

@media screen and (max-width: 767px) {
  :root {
    --sticky-page-top: 70px;
  }

  .isDesktop:not(.isMobile),
  .isTablet:not(.isMobile) {
    display: none !important;
  }

  .wrapper {
    width: min(100% - 24px, 1180px);
  }

  .app-topbar {
    padding-top: 10px;
  }

  .topbar-shell {
    min-height: 58px;
    padding: 0 14px;
  }

  .account-trigger span {
    display: none;
  }

  .home-discover h1,
  body.search h1,
  body.user h1,
  body.item h1,
  .form-container .header h1 {
    font-size: 32px;
    line-height: 38px;
  }

  .home-discover,
  #main > h1 {
    border-radius: 0 0 16px 16px;
    padding: 14px;
  }

  .form-container > .header {
    margin: -22px -22px 18px;
    padding: 14px 22px 0;
  }

  .home-book-search {
    display: grid;
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
    padding: 10px;
  }

  .home-book-search-category,
  .home-book-search-query {
    border: 0;
    height: 46px;
  }

  .home-book-search button {
    height: 42px;
    margin: 8px 0 0;
    width: 100%;
  }

  .listing-card-list.listing-grid,
  .book-category-grid {
    grid-template-columns: 1fr;
  }

  .listing-card {
    min-height: 0;
  }

  .listing-thumb {
    height: 190px;
  }

  .list-header .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .list-header .actions .btn,
  .list-header .actions > span,
  .doublebutton {
    width: 100%;
  }

  .doublebutton a {
    flex: 1;
  }
}

@media screen and (max-width: 520px) {
  .sidebar-menu,
  .sidebar-menu-muted {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}
