/* Mobile only: move the home logo into the fixed top bar and remove the
   separate logo/title header above the search bar. Desktop remains unchanged. */
@media (max-width: 780px) {
  /* Keep the same 56px bar height while reclaiming a little internal room. */
  .topbar {
    padding: 2px 16px !important;
  }

  .topbar > .center {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    pointer-events: none !important;
    z-index: 1 !important;
  }

  .topbar > .left,
  .topbar > .right {
    position: relative !important;
    z-index: 2 !important;
  }

  .mobile-topbar-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
    line-height: 0 !important;
    pointer-events: auto !important;
    text-decoration: none !important;
  }

  /* Larger mobile logo while retaining the existing 56px top-bar height. */
  .mobile-topbar-logo img {
    display: block !important;
    width: 52px !important;
    height: 52px !important;
    object-fit: contain !important;
  }

  /* Remove the old mobile logo, Checklist label, and Comic Cut Finder title. */
  body > .container > header.page {
    display: none !important;
  }

  /* Keep a 20px gap between the fixed top bar and the search controls. */
  body > .container {
    padding-top: 12px !important;
  }

  body > .container > .searchwrap {
    padding-top: 8px !important;
    margin-top: 0 !important;
  }

  /* Reduce the current search-to-slider spacing by 25%. */
  .new-sets-viewport {
    margin-top: 8.25px !important;
  }

  .result,
  #result .empty {
    margin-top: 11px !important;
  }

  /* When an actual search result is displayed, add a little more breathing
     room below the search controls without changing the home slider gap. */
  #result > :first-child:not(.empty) {
    margin-top: 9px !important;
  }
}

@media (max-width: 480px) {
  .new-sets-viewport {
    margin-top: 6.75px !important;
  }
}
