/* Marketplace uses the same visual header language as the homepage. */
.marketplace-home-header .site-hub-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  flex: 0 0 34px;
  margin-left: 4px;
  border: 1px solid rgba(124, 58, 237, .35);
  border-radius: 9px;
  background: linear-gradient(145deg, #f3efff, #e0e7ff);
  color: #6d28d9;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(109, 40, 217, .16);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.marketplace-home-header .site-hub-trigger:hover,
.marketplace-home-header .site-hub-trigger:focus-visible {
  transform: translateY(-1px);
  border-color: #7c3aed;
  box-shadow: 0 6px 16px rgba(109, 40, 217, .24);
  outline: none;
}

.marketplace-home-header .site-hub-trigger__mark {
  font: 800 8px/1.05 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
}

.marketplace-home-header .tb-profile-link .mh-ava {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.marketplace-home-header .tb-profile-link .mh-ava svg {
  width: 18px;
  height: 18px;
  display: block;
  color: #1769e8;
}

.marketplace-home-header .tb-profile-link .mh-ava img {
  object-fit: contain;
}

/* Keep the right-side controls in the same order and spacing as the homepage. */
.marketplace-home-header .topbar {
  gap: 8px !important;
}

.marketplace-home-header .topbar .tb-logo {
  order: 1 !important;
}

.marketplace-home-header .topbar .tb-live {
  order: 2 !important;
}

.marketplace-home-header .topbar .tb-desktop-quick-nav {
  order: 3 !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.marketplace-home-header .topbar .tb-right {
  order: 4 !important;
  margin-left: auto !important;
}

.marketplace-home-header .topbar .site-hub-trigger {
  order: 5 !important;
  margin-left: 0 !important;
}

.marketplace-home-header .topbar .site-menu-trigger {
  order: 6 !important;
  margin-left: 0 !important;
}

/* One account control, one frame: remove the nested legacy account boxes. */
.marketplace-home-header .topbar .tb-user-menu {
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Guest state must stay hidden even when the visual user-menu rules load. */
.marketplace-home-header .topbar .tb-user-menu[data-auth="user"][aria-hidden="true"] {
  display: none !important;
}

.marketplace-home-header .topbar .tb-user-menu[data-auth="user"]:not([aria-hidden="true"]) {
  display: flex !important;
}

.marketplace-home-header .topbar .tb-user-menu > .tb-profile-link,
.marketplace-home-header .topbar .tb-user-menu > .tb-profile-link:hover {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  border: 1px solid rgba(24, 119, 242, .24) !important;
  border-radius: 11px !important;
  background: #eef4ff !important;
  color: #1769e8 !important;
  box-shadow: 0 2px 8px rgba(23, 79, 145, .12) !important;
}

.marketplace-home-header .topbar .tb-user-menu .mh-ava,
.marketplace-home-header .topbar .tb-user-menu .mh-ava img {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex: 0 0 100% !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
}

.marketplace-home-header .topbar .tb-user-menu .mh-ava svg {
  width: 25px !important;
  height: 25px !important;
}

.marketplace-home-header .topbar .tb-user-menu .tb-pmtxt {
  display: none !important;
}

@media (max-width: 900px) {
  .marketplace-home-header .site-hub-trigger {
    width: 30px;
    min-width: 30px;
    height: 30px;
    flex: 0 0 30px;
    margin-left: 3px;
    border-radius: 8px;
  }

  .marketplace-home-header .site-hub-trigger__mark {
    font-size: 7px;
  }

  .marketplace-home-header .topbar .tb-user-menu > .tb-profile-link,
  .marketplace-home-header .topbar .tb-user-menu > .tb-profile-link:hover {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  .marketplace-home-header .topbar .tb-user-menu .mh-ava,
  .marketplace-home-header .topbar .tb-user-menu .mh-ava img {
    border-radius: 9px !important;
  }
}