/* Zifengling logo — Mastodon 4.7, all color schemes. */
.navigation-panel .column-link--logo,
.admin-wrapper .sidebar > a:first-child,
.admin-wrapper .sidebar__toggle__logo > a {
  display: block !important;
  width: 150px !important;
  height: 50px !important;
  padding: 0 !important;
  background: url('https://zifengling.com/system/site_uploads/files/000/000/005/original/073da256d29acdb0.png') center / contain no-repeat !important;
}

.navigation-panel .column-link--logo > .logo,
.admin-wrapper .sidebar > a:first-child > .logo,
.admin-wrapper .sidebar__toggle__logo > a > .logo {
  display: none !important;
}

/* Mobile home/discovery headers now use an img instead of the old header logo. */
.layout-single-column .column-header__title img.logo--icon {
  content: url('https://zifengling.com/system/site_uploads/files/000/000/005/original/073da256d29acdb0.png');
  width: 150px !important;
  height: 38px !important;
  max-width: 42vw;
  object-fit: contain;
}

/* Authentication pages no longer wrap their wordmark in h1. */
.logo-container {
  width: min(261px, calc(100vw - 48px));
  height: 82px;
  margin-inline: auto;
  background: url('https://zifengling.com/system/site_uploads/files/000/000/005/original/073da256d29acdb0.png') center / contain no-repeat !important;
}

.logo-container > a {
  display: block;
  width: 100%;
  height: 100%;
}

.logo-container > .logo,
.logo-container > a > .logo {
  display: none !important;
}

/* Restore Mastodon's single admin header below its sidebar breakpoint. */
@media (max-width: 890px) {
  .admin-wrapper .sidebar > a:first-child {
    display: none !important;
  }
}

/* Match Mastodon's mobile layout; desktop wordmarks and menu icons stay intact. */
@media (max-width: 630px) {
  :root {
    --zfl-mobile-logo: url('https://zifengling.com/system/site_uploads/files/000/000/009/48/507e6be1c9b011a1.png');
  }

  .layout-single-column .column-header__title:has(> :is(img.logo--icon, .column-header__icon:is(.icon-home, .icon-globe, .icon-explore, .icon-bell, .icon-list-ul, .icon-hashtag, .icon-star, .icon-bookmarks, .icon-at)))::before,
  body.layout-single-column:has(.column header a[href$='/collections/featuring-you']) .column-header:has(> .column-header__back-button)::before {
    content: '';
    display: block;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-self: center;
    margin-inline-end: 6px;
    background: var(--zfl-mobile-logo) center / contain no-repeat;
  }

  .layout-single-column .column-header__title > :is(img.logo--icon, .column-header__icon:is(.icon-home, .icon-globe, .icon-explore, .icon-bell, .icon-list-ul, .icon-hashtag, .icon-star, .icon-bookmarks, .icon-at)) {
    display: none !important;
  }

  /* Collections has a back button instead of a titled ColumnHeader. */
  body.layout-single-column:has(.column header a[href$='/collections/featuring-you']) .column-header:has(> .column-header__back-button)::before {
    margin-inline-start: 13px;
  }

  .admin-wrapper .sidebar__toggle__logo > a {
    width: 48px !important;
    height: 56px !important;
    margin-inline-start: 12px;
    background-image: var(--zfl-mobile-logo) !important;
    background-size: 28px 28px !important;
  }
}


