@media (max-width: 767px) {
  #guest-portal[data-compact-home] .guest-topbar-inner {
    min-height: 62px;
  }

  #guest-portal[data-compact-home] .guest-content {
    padding-top: 6px;
  }

  #guest-portal[data-compact-home] .ls-homepage-hero {
    margin-block: 0 6px;
  }

  #guest-portal[data-compact-home] .guest-home-services {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 9px;
    margin-block: 0 6px;
  }

  #guest-portal[data-compact-home] .guest-home-services > .co-home {
    margin: 0;
    padding: 6px 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 5px;
  }

  #guest-portal[data-compact-home] .guest-home-services .co-home h2 {
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-home-services .co-home p {
    margin-block: 3px 0;
  }

  #guest-portal[data-compact-home] .guest-home-services > .me-home-entry {
    display: grid;
    align-content: center;
    gap: 4px;
    margin: 0;
    min-width: 0;
  }

  #guest-portal[data-compact-home] .guest-home-services .me-public-tag {
    justify-content: center;
    min-height: 38px;
    margin: 0;
    padding: 5px 8px;
    gap: 4px;
    width: 100%;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-home-services .me-tag-mark {
    width: 24px;
    height: 24px;
  }

  #guest-portal[data-compact-home] .me-home-entry :is([data-tongue-observation], [data-liansheng-tongue-entry]) {
    order: -1;
  }

  #guest-portal[data-compact-home] #guest-discover {
    margin-block: 0 6px;
  }

  #guest-portal[data-compact-home] #guest-discover > .guest-result-bar {
    display: block;
    margin: 0;
    padding: 0;
  }

  #guest-portal[data-compact-home] #guest-discover .search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding-block: 10px 8px;
  }

  #guest-portal[data-compact-home] #guest-discover:not(.guest-filters-expanded) .search-row {
    border-bottom: 0;
  }

  #guest-portal[data-compact-home] .guest-member-heading {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  #guest-portal[data-compact-home] .guest-member-heading .result-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-heading #guest-result-count {
    display: block;
    margin: 3px 0 0;
    font-size: 10px;
    line-height: 1.35;
  }

  #guest-portal[data-compact-home] .guest-member-heading .gender-tabs {
    width: 100%;
    min-width: 0;
    gap: 4px;
  }

  #guest-portal[data-compact-home] .guest-member-heading .gender-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    padding-inline: 4px;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    column-gap: 4px;
    min-width: 0;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search-form {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    gap: 4px;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search {
    min-height: 38px;
    padding-inline-end: 3px;
    font-size: 12px;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search-form > button {
    min-height: 38px;
    padding-inline: 2px;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-sort {
    display: block;
    box-sizing: border-box;
    width: calc(6em + 27px);
    min-width: 0;
    max-width: none;
    min-height: 38px;
    margin: 0;
    padding-block: 0;
    padding-inline: 10px 15px;
    border: 0;
    border-inline-start: 1px solid var(--line, #eadbe2);
    border-radius: 0;
    background:
      linear-gradient(45deg, transparent 47%, currentColor 48% 63%, transparent 64%) right 9px center / 4px 5px no-repeat,
      linear-gradient(135deg, transparent 47%, currentColor 48% 63%, transparent 64%) right 5px center / 4px 5px no-repeat;
    appearance: none;
    font-size: 11px;
    text-align: center;
    text-align-last: center;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-sort[hidden],
  #guest-portal[data-compact-home] #guest-discover .member-sort-options[hidden] {
    display: none;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-more-filters {
    min-height: 38px;
    padding-inline: 5px 0;
    gap: 3px;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-grid {
    row-gap: 7px;
  }

  #guest-portal[data-compact-home] .guest-privacy-note {
    margin-block: 12px 8px;
  }

  #guest-portal[data-compact-home] .ls-stats-bar {
    display: contents;
  }

  #guest-portal[data-compact-home] .ls-stats-bar .guest-access-note {
    display: none;
  }

  #guest-portal[data-compact-home] .ls-stats-bar .guest-statistics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    gap: 0;
    margin: 4px 0 2px;
  }

  #guest-portal[data-compact-home] .guest-statistics .stat {
    display: inline-flex;
    flex: 0 0 auto;
    flex-flow: row-reverse nowrap;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    padding: 0 8px;
  }

  #guest-portal[data-compact-home] .guest-statistics .stat :is(.stat-number, .stat-label) {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
  }
}

@media (max-width: 374px) {
  #guest-portal[data-compact-home] .guest-home-services > .co-home {
    grid-template-columns: minmax(0, 1fr);
  }

  #guest-portal[data-compact-home] .guest-home-services .co-home [data-co-directory] {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    margin-top: 3px;
  }
}

@media (max-width: 360px) {
  #guest-portal[data-compact-home] #guest-discover .search-row {
    padding-inline: 10px;
  }

  #guest-portal[data-compact-home] .guest-member-heading {
    gap: 5px;
  }

  #guest-portal[data-compact-home] .guest-member-heading .result-title {
    font-size: 19px;
  }

  #guest-portal[data-compact-home] .guest-member-heading .gender-tab {
    padding-inline: 2px;
    font-size: 11px;
  }

  #guest-portal[data-compact-home] .guest-member-tools {
    column-gap: 2px;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search {
    padding-inline-start: 7px;
    font-size: 11px;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search-form > .icon {
    display: none;
  }
}

@media (max-width: 767px) and (forced-colors: active) {
  #guest-portal[data-compact-home] .guest-member-tools #guest-sort {
    background: none;
    appearance: auto;
    padding-inline-end: 0;
  }
}

@media (width > 767px) {
  #guest-portal[data-compact-home] .ls-homepage-hero {
    margin-block-end: 14px;
  }

  #guest-portal[data-compact-home] .guest-home-services {
    display: flex;
    align-items: stretch;
    gap: 14px;
    margin-block: 0 14px;
  }

  #guest-portal[data-compact-home] .guest-home-services > .co-home {
    flex: 1 1 auto;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px clamp(12px, 2vw, 26px);
    min-width: 0;
    margin: 0;
    padding: 12px clamp(14px, 2vw, 24px);
  }

  #guest-portal[data-compact-home] .guest-home-services .co-home p {
    grid-area: 1 / 2;
    margin: 0;
  }

  #guest-portal[data-compact-home] .guest-home-services .co-home [data-co-directory] {
    grid-area: 1 / 3;
    align-self: center;
  }

  #guest-portal[data-compact-home] .guest-home-services > .me-home-entry {
    align-content: center;
    gap: 8px;
    margin: 0;
  }

  #guest-portal[data-compact-home] .guest-home-services .me-public-tag {
    justify-content: center;
    min-height: 42px;
    padding-inline: clamp(12px, 1.6vw, 20px);
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .me-home-entry :is([data-tongue-observation], [data-liansheng-tongue-entry]) {
    order: -1;
  }

  #guest-portal[data-compact-home] #guest-discover {
    margin-block: 0 12px;
  }

  #guest-portal[data-compact-home] #guest-discover > .guest-result-bar {
    display: block;
    margin: 0;
    padding: 0;
  }

  #guest-portal[data-compact-home] #guest-discover .search-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 12px clamp(12px, 2vw, 28px);
    padding: 13px clamp(14px, 2vw, 24px);
  }

  #guest-portal[data-compact-home] #guest-discover:not(.guest-filters-expanded) .search-row {
    border-bottom: 0;
  }

  #guest-portal[data-compact-home] #guest-discover:not(.guest-filters-expanded) .filter-fields {
    display: none;
  }

  #guest-portal[data-compact-home] #guest-discover.guest-filters-expanded .filter-fields {
    display: grid;
  }

  #guest-portal[data-compact-home] .guest-member-heading {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 26px);
    min-width: 0;
  }

  #guest-portal[data-compact-home] .guest-member-heading .result-title {
    margin: 0;
    font-size: clamp(21px, 2.25vw, 26px);
    line-height: 1.25;
  }

  #guest-portal[data-compact-home] .guest-member-heading #guest-result-count {
    display: block;
    margin: 3px 0 0;
    font-size: 11px;
    line-height: 1.35;
  }

  #guest-portal[data-compact-home] .guest-member-heading .gender-tabs {
    width: auto;
  }

  #guest-portal[data-compact-home] .guest-member-heading .gender-tab {
    min-width: 62px;
    min-height: 38px;
    padding-inline: clamp(8px, 1.1vw, 14px);
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    align-items: center;
    justify-self: end;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search-form {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    margin: 0;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-search-form > button,
  #guest-portal[data-compact-home] .guest-member-tools #guest-more-filters {
    min-height: 40px;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-more-filters {
    display: inline-flex;
    align-items: center;
    padding-inline: 8px 0;
  }

  #guest-portal[data-compact-home] .guest-member-tools #guest-sort:not([hidden]) {
    display: block;
    box-sizing: border-box;
    width: calc(6em + 42px);
    min-height: 40px;
    max-width: none;
    margin: 0;
    padding: 0 7px 0 10px;
    border: 0;
    border-inline-start: 1px solid var(--line, #eadbe2);
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    white-space: nowrap;
  }

  #guest-portal[data-compact-home] #guest-discover .member-sort-options[hidden] {
    display: none;
  }

  #guest-portal[data-compact-home] .ls-stats-bar {
    display: contents;
  }

  #guest-portal[data-compact-home] .ls-stats-bar .guest-access-note {
    display: none;
  }

  #guest-portal[data-compact-home] .ls-stats-bar .guest-statistics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 8px 0 4px;
  }

  #guest-portal[data-compact-home] .guest-statistics .stat {
    display: inline-flex;
    flex: 0 0 auto;
    flex-flow: row-reverse nowrap;
    align-items: baseline;
    gap: 4px;
    padding: 0 12px;
  }

  #guest-portal[data-compact-home] .guest-statistics .stat :is(.stat-number, .stat-label) {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
  }
}

@media (767px < width < 900px) {
  #guest-portal[data-compact-home] #guest-discover .search-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
  }
}

#guest-portal[data-hide-empty-home-banner] .ls-homepage-hero:has(> .hc-carousel > div.hc-empty),
#guest-portal[data-hide-empty-home-banner][data-tenant-home] .ls-homepage-hero:not(.ls-homepage-has-cover):not(:has(> .hc-carousel, > .ls-homepage-backdrop, > .pm-hero-image)) {
  display: none;
}

#guest-portal[data-compact-home-services] .guest-home-services {
  display: grid;
  grid-template: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  width: min(100%, 390px);
  gap: 9px;
}

#guest-portal[data-compact-home-services] .guest-home-services > .me-home-entry {
  display: contents;
}

#guest-portal[data-compact-home-services] .guest-home-services :is([data-co-directory], [data-member-entertainment]) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--line, #eadbe2);
  border-radius: 999px;
  color: var(--wine, #8e405b);
  background: var(--paper, #fff);
  font-size: 13px;
  white-space: nowrap;
}

#guest-portal[data-compact-home-services] .guest-home-services :is([data-co-directory], [data-member-entertainment]):hover {
  background: var(--rose, #f7edf1);
}

[data-liansheng-tongue-entry],
a[data-tongue-observation][href="/wechat/tongue-observation"],
#guest-portal[data-compact-home-services] :is([data-tongue-observation], a[href^="/wechat/tongue-observation"]) {
  display: none !important;
}
