/* Desktop layout only. Phone styles live outside this query and must stay unchanged. */
@media (min-width: 1024px) {
  html:not(.cheerdi-embed),
  html:not(.cheerdi-embed) body {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  html:not(.cheerdi-embed) body {
    padding-left: 232px !important;
    padding-bottom: 28px !important;
  }
  html.cheerdi-embed,
  html.cheerdi-embed body {
    padding-left: 0 !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    width: 220px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: 220px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    padding: 16px 10px 78px !important;
    border-top: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    grid-template-columns: none !important;
    z-index: 10000 !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a,
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav button.bn-btn {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    text-align: left !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    padding: 12px 14px !important;
    min-height: 48px !important;
    margin: 0 !important;
    border-radius: 12px !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a:hover,
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav button.bn-btn:hover {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.1) !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a.active {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.16) !important;
    box-shadow: inset 3px 0 0 #00d4ff;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a span,
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav button.bn-btn span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 1.6rem !important;
    font-size: 1.25rem !important;
    margin: 0 !important;
    line-height: 1 !important;
    flex: 0 0 1.6rem !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a span.bn-count[hidden],
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav .bn-count[hidden] {
    display: none !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a span.bn-count.is-unread {
    display: inline-flex !important;
    position: static !important;
    width: auto !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    font-size: 0.7rem !important;
  }
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav a span.bn-label,
  html:not(.cheerdi-embed) nav.cheerdi-bottom-nav button.bn-btn span.bn-label {
    font-size: 1rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    width: auto !important;
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
  }

  html:not(.cheerdi-embed) nav.cheerdi-top-nav.cheerdi-micro-bar,
  html:not(.cheerdi-embed) #cheerdiTopNav.cheerdi-micro-bar {
    top: auto !important;
    bottom: 14px !important;
    left: 12px !important;
    right: auto !important;
    width: 196px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    justify-content: space-evenly !important;
    z-index: 10001 !important;
  }
  html:not(.cheerdi-embed) .cheerdi-micro-bar a.tn-micro,
  html:not(.cheerdi-embed) #nav-home-btn,
  html:not(.cheerdi-embed) #nav-profile-btn,
  html:not(.cheerdi-embed) #nav-settings-btn {
    width: 44px !important;
    height: 40px !important;
    font-size: 1.3rem !important;
  }
  html:not(.cheerdi-embed) .cheerdi-micro-bar .tn-ico {
    font-size: 1.3rem !important;
  }

  iframe.cheerdi-tab-frame,
  .cheerdi-tab-frame,
  #tab-content-frame,
  .tab-frame {
    left: 220px !important;
    right: 0 !important;
    width: auto !important;
    top: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
  }

  .wrap,
  .page-shell,
  .feed-container,
  .marketplace-wrap,
  .live-shell,
  .live-page {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .page-shell,
  .marketplace-wrap,
  .wrap {
    max-width: 1200px !important;
    width: 100% !important;
  }

  html:not(.cheerdi-embed) .reels-shell {
    left: 220px !important;
    right: 0 !important;
    width: auto !important;
  }

  form input,
  form textarea,
  form select,
  .composer input,
  .composer textarea,
  .composer select {
    font-size: 1rem;
    min-height: 44px;
  }
  form button,
  .btn,
  .go-live-cta {
    font-size: 1rem;
  }

  #messages-container,
  #messages-container.msg-shell,
  .chat-viewport-wrapper.msg-shell {
    max-width: none !important;
    width: auto !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 340px minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    align-items: stretch !important;
  }
  #messages-container > .messages-header {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  #conversations-view,
  #conversations-view.wrap,
  #conversations-list,
  #conversationList {
    min-height: 0 !important;
  }
  #conversations-view {
    display: flex !important;
    flex-direction: column !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 340px !important;
    max-width: 340px !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: auto !important;
  }
  #active-chat-view,
  #active-chat-view.open,
  #active-chat-view:not(.open),
  #chatView,
  #chatView.open,
  #chatView:not(.open) {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    bottom: auto !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex-direction: column !important;
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    min-width: 0 !important;
  }
  #active-chat-view .chat-head,
  #chatView .chat-head {
    order: 0;
    position: relative !important;
    top: 0 !important;
    bottom: auto !important;
    flex: 0 0 auto;
  }
  #active-chat-view:not(.open) .chat-head,
  #active-chat-view:not(.open) .chat-compose,
  #active-chat-view:not(.open) #chatMessages,
  #chatView:not(.open) .chat-head,
  #chatView:not(.open) .chat-compose,
  #chatView:not(.open) #chatMessages {
    display: none !important;
  }
  #active-chat-view:not(.open) .desktop-chat-empty,
  #chatView:not(.open) .desktop-chat-empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
  }
  #chatMessages {
    order: 1;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
  }
  #active-chat-view .chat-compose,
  #chatView .chat-compose {
    order: 2;
    position: relative !important;
    bottom: auto !important;
    flex: 0 0 auto;
  }
  #active-chat-view .chat-head ~ .chat-head,
  #active-chat-view .chat-compose ~ .chat-compose {
    display: none !important;
  }

  /* Full-screen snap cards collapse when the PC body height is auto. Use a real grid. */
  html:not(.cheerdi-embed) body.avatar-viewer,
  html.cheerdi-embed body.avatar-viewer {
    height: auto !important;
    min-height: 100dvh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    display: block !important;
  }
  html:not(.cheerdi-embed) body.avatar-viewer #avatarDeck,
  html:not(.cheerdi-embed) body.avatar-viewer .avatar-community-container,
  html.cheerdi-embed body.avatar-viewer #avatarDeck,
  html.cheerdi-embed body.avatar-viewer .avatar-community-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 16px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    align-items: start !important;
    padding: 16px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  html:not(.cheerdi-embed) body.avatar-viewer .avatar-snap-card,
  html.cheerdi-embed body.avatar-viewer .avatar-snap-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: max-content !important;
    aspect-ratio: auto !important;
    align-self: start !important;
    scroll-snap-align: none !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    border-radius: 18px !important;
    background: #12182a !important;
    border: 1px solid rgba(0, 212, 255, 0.22) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease !important;
  }
  html:not(.cheerdi-embed) body.avatar-viewer .avatar-snap-card:hover,
  html.cheerdi-embed body.avatar-viewer .avatar-snap-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 18px 36px rgba(0, 212, 255, 0.18) !important;
  }
  html:not(.cheerdi-embed) body.avatar-viewer .avatar-snap-card:hover .photo,
  html.cheerdi-embed body.avatar-viewer .avatar-snap-card:hover .photo {
    transform: scale(1.04) !important;
  }
  body.avatar-viewer .avatar-snap-card .frame {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 4 !important;
    flex: 0 0 auto !important;
    overflow: hidden !important;
  }
  body.avatar-viewer .avatar-snap-card .photo,
  body.avatar-viewer .avatar-snap-card .ph {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 25% !important;
    filter: none !important;
    opacity: 1 !important;
  }
  body.avatar-viewer .avatar-snap-card .caption {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 1 !important;
    padding: 12px 14px 16px !important;
    text-align: left !important;
    background: transparent !important;
  }
  body.avatar-viewer .avatar-snap-card .caption strong {
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    text-align: left !important;
  }
  body.avatar-viewer .avatar-snap-card .bio {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
    max-width: none !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
    line-height: 1.4 !important;
  }
}
