/* Facebook-complete UI */

.fb-dropdown-wrap { position: relative; }
.fb-dropdown {
  position: fixed;
  top: auto;
  left: auto;
  right: auto;
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(480px, calc(100vh - var(--topbar-h, 56px) - 24px));
  overflow: hidden;
  background: var(--bg-card, #fff); color: var(--text, #1c1e21);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1100; display: none; flex-direction: column;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#fb-apps-dd {
  width: min(320px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
}

#fb-apps-dd.open,
.profile-dropdown:not(.hidden) {
  position: fixed;
}
.fb-dropdown.open { display: flex; }
.fb-dropdown-header {
  padding: 12px 16px; font-size: 1.35rem; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
.fb-dropdown-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

#fb-apps-dd .apps-grid,
.profile-dropdown,
.fb-dropdown-body {
  scrollbar-width: thin;
  scrollbar-color: #bcc0c4 transparent;
}

#fb-apps-dd.open {
  max-height: calc(100vh - var(--topbar-h, 56px) - 12px);
  overflow: hidden;
}

#fb-apps-dd .apps-grid {
  max-height: calc(100vh - var(--topbar-h, 56px) - 88px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.fb-dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  cursor: pointer; text-decoration: none; color: inherit;
  min-height: 44px;
}
.fb-dropdown-item:hover { background: var(--bg-page); }
.fb-dropdown-item.unread { background: var(--jtb-yellow-soft); }
.fb-dropdown-footer {
  padding: 10px; text-align: center; border-top: 1px solid var(--border);
}
.fb-dropdown-footer a { color: var(--jtb-yellow-hover); font-weight: 600; font-size: 0.9rem; }

/* Live stream alert (Facebook-style) */
.jtb-live-alert {
  position: fixed;
  top: calc(var(--topbar-h, 56px) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 10002;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  max-width: min(420px, calc(100vw - 24px));
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.jtb-live-alert.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.live-post-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(228, 30, 63, 0.12), rgba(228, 30, 63, 0.04));
  border: 1px solid rgba(228, 30, 63, 0.18);
}

.live-post-banner .live-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  background: #e41e3f;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.jtb-live-alert-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  margin-left: auto;
}

.jtb-live-alert .btn-sm {
  width: auto;
  padding: 8px 14px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  #fb-messenger-dd.open,
  #fb-notif-dd.open {
    position: fixed !important;
    top: calc(var(--topbar-h, 58px) + 4px) !important;
    left: 12px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 10000 !important;
    max-height: min(480px, calc(100vh - var(--topbar-h, 58px) - 32px)) !important;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  }
}

.apps-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px;
}
.apps-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: var(--radius); text-decoration: none;
  color: inherit; font-size: 0.8rem; font-weight: 600;
}
.apps-grid a:hover { background: var(--bg-page); }
.apps-grid i {
  width: 48px; height: 48px; border-radius: 12px; background: var(--jtb-yellow-soft);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #b8860b;
}

/* Reactions */
.reaction-bar-wrap { position: relative; flex: 1; }
.reaction-picker {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  background: #fff; border-radius: 28px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  padding: 6px 10px; display: none; gap: 4px; z-index: 50; margin-bottom: 8px;
}
.reaction-bar-wrap:hover .reaction-picker,
.reaction-picker:hover,
.reaction-picker.open { display: flex; }
@media (hover: none) {
  .reaction-bar-wrap:hover .reaction-picker:not(.open) { display: none; }
}
.reaction-picker:not(.open) { pointer-events: none; }
.reaction-picker.open { pointer-events: auto; }
.reaction-emoji {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent;
  font-size: 1.5rem; cursor: pointer; transition: transform 0.15s;
}
.reaction-emoji:hover { transform: scale(1.3); }

.stats-link {
  border: none; background: transparent; color: var(--text-muted);
  cursor: pointer; font: inherit; padding: 0;
}
.stats-link:hover { text-decoration: underline; color: var(--text); }

.post-stats {
  position: relative;
  z-index: 2;
}
.post-stats .stats-right {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  pointer-events: auto;
}
.post-stats [data-action="open-comments"],
.post-stats .open-comments-btn,
.post-stats .stats-link {
  position: relative;
  z-index: 3;
  pointer-events: auto !important;
  touch-action: manipulation;
  min-height: 36px;
  padding: 6px 4px;
  margin: -6px -4px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.post-stats .stats-shares {
  pointer-events: none;
  user-select: none;
}

.post-actions [data-action="toggle-comments"],
.post-actions .comment-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.comment-main { display: flex; gap: 8px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; }
.comment-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}
.comment-avatar-link {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.comment-author-link {
  text-decoration: none;
  color: inherit;
}
.comment-author-link:hover { text-decoration: underline; }
.comment-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #e4e6eb;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0; color: #65676b;
}
.comment-avatar.sm { width: 24px; height: 24px; font-size: 0.6rem; }
.comment-bubble {
  background: #f0f2f5; border-radius: 18px; padding: 8px 12px;
  max-width: 100%; line-height: 1.35; flex: 1; min-width: 0;
}
.comment-bubble strong { display: block; font-size: 0.82rem; }
.comment-text { font-size: 0.92rem; }

.comment-pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--jtb-primary, #1877f2);
  margin-bottom: 2px;
}
.comment-pinned-badge i { font-size: 0.68rem; }
.comment-item.comment-pinned > .comment-main .comment-bubble,
.reel-comment-item.comment-pinned .reel-comment-bubble {
  background: rgba(24, 119, 242, 0.06);
}

.comment-options-wrap {
  position: relative;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.comment-item:hover .comment-options-wrap,
.comment-options-wrap:focus-within,
.comment-options-wrap:has(.comment-options-menu.open) {
  opacity: 1;
}
@media (hover: none), (pointer: coarse) {
  .comment-options-wrap { opacity: 1; }
}

@media (max-width: 767px) {
  .comment-options-wrap {
    display: none !important;
  }

  .comment-item,
  .reel-comment-item {
    -webkit-touch-callout: none;
    user-select: none;
  }

  .comment-item .comment-text,
  .reel-comment-item p {
    user-select: none;
  }
}

.comment-action-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.comment-action-sheet-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.comment-action-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.comment-action-sheet {
  position: relative;
  width: min(100%, 480px);
  background: var(--bg-card, #fff);
  border-radius: 16px 16px 0 0;
  padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.24s ease;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
}

.comment-action-sheet-overlay.open .comment-action-sheet {
  transform: translateY(0);
}

.comment-action-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 4px auto 12px;
}

.comment-action-sheet-preview {
  margin: 0 8px 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.comment-action-sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-action-sheet-btn {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 14px 12px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-action-sheet-btn:hover,
.comment-action-sheet-btn:active {
  background: var(--bg-page);
}

.comment-action-sheet-btn.danger {
  color: #e41e3f;
}

.comment-action-sheet-cancel {
  width: 100%;
  margin-top: 8px;
  border: none;
  background: var(--bg-page);
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

body.comment-sheet-open {
  overflow: hidden;
}
.comment-options-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}
.comment-options-btn:hover { background: var(--bg-page, #e4e6eb); }
.comment-options-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  min-width: 180px;
  padding: 6px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.comment-options-menu.open { display: block; }
.comment-options-menu button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text, #050505);
  margin: 0;
}
.comment-options-menu button:hover { background: var(--bg-page, #f0f2f5); }
.comment-options-danger { color: #e41e3f !important; }

.comment-item.comment-reply,
.comment-item.is-reply {
  display: block;
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.comment-item.comment-reply > .comment-main,
.comment-item.is-reply > .comment-main {
  display: flex;
  gap: 8px;
}

/* Single vertical reply rail per root comment — no compounding indent */
.comment-replies {
  margin-left: 20px;
  margin-top: 4px;
  padding-left: 12px;
  border-left: 2px solid var(--border-color, var(--border, #e0e0e0));
  width: auto;
}
.comment-replies .comment-replies {
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: none !important;
}
.comment-replies .comment-item,
.comment-replies .comment-item.comment-reply,
.comment-replies .comment-item.is-reply,
.comment-replies .reel-comment-item {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
.comment-replies-toggle,
.btn-toggle-replies,
.btn-toggle-feed-replies {
  border: none;
  background: transparent;
  color: var(--text-muted, #65676b);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 6px 0 2px;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 10;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-toggle-feed-replies {
  color: #2563eb;
  z-index: 50 !important;
  margin-left: 8px;
}

.comment-replies-toggle:hover,
.btn-toggle-replies:hover,
.btn-toggle-feed-replies:hover { text-decoration: underline; color: var(--text, #050505); }

.btn-toggle-feed-replies:hover {
  color: #1d4ed8;
}

.replies-container.hidden,
.comment-replies.hidden {
  display: none !important;
}

.comment-replies.collapsed > .comment-item,
.comment-replies.collapsed > .comment-reply,
.comment-replies.collapsed > .reel-comment-item {
  display: none;
}

.comment-replies {
  position: relative;
  z-index: 2;
}

.comment-replies.expanded > .comment-replies-toggle,
.comment-replies.expanded > .btn-toggle-replies,
.comment-replies.expanded > .btn-toggle-feed-replies,
.replies-container.expanded > .btn-toggle-replies,
.replies-container.expanded > .btn-toggle-feed-replies,
.replies-list.expanded > .btn-toggle-feed-replies {
  margin-top: 4px;
}

.comment-inline-reply {
  display: flex; gap: 8px; margin: 8px 0 4px 20px; align-items: center;
}
.comment-replies .comment-inline-reply {
  margin-left: 0 !important;
}
.comment-inline-reply input {
  flex: 1; border: none; background: #f0f2f5; border-radius: 18px;
  padding: 8px 12px; font: inherit;
}
.comment-inline-reply input:focus { outline: 2px solid rgba(255,204,0,0.5); }
.post-actions button.reacted-like { color: #1877f2; }
.post-actions button.reacted-love { color: #e41e3f; }
.post-actions button.reacted-haha { color: #f7b928; }
.post-actions button.reacted-wow { color: #f7b928; }
.post-actions button.reacted-sad { color: #f7b928; }
.post-actions button.reacted-angry { color: #e9710f; }

.post-image {
  width: 100%; display: block; max-height: min(600px, 70vh); object-fit: cover; cursor: pointer;
}
.post-privacy { font-size: 0.75rem; color: var(--text-muted); }
.post-menu-wrap { position: relative; }
.post-menu {
  position: absolute; right: 0; top: 100%; z-index: 60;
  background: #fff; border-radius: var(--radius-lg); box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 220px; padding: 8px; display: none;
}
.post-menu.flip-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.post-menu.group-menu-fixed {
  display: block;
}
.post-menu.open { display: block; }
.post-menu button {
  width: 100%; text-align: left; border: none; background: transparent;
  padding: 10px 12px; border-radius: var(--radius); cursor: pointer;
  font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 10px;
}
.post-menu button:hover { background: var(--bg-page); }
.post-menu-danger { color: #e41e3f !important; }

@media (max-width: 767px) {
  .post-menu-desktop,
  .post-menu-wrap.post-menu-desktop {
    display: none !important;
  }

  .post-card.post-action-target,
  .group-post-card.post-action-target {
    -webkit-touch-callout: none;
    user-select: none;
  }
}

@media (min-width: 768px) {
  .post-menu-desktop {
    display: block;
  }
}

.privacy-selector {
  display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600;
  color: var(--jtb-yellow-hover); cursor: pointer; border: none; background: transparent;
  padding: 4px 8px; border-radius: var(--radius);
}
.privacy-selector:hover { background: var(--bg-page); }

.share-options { display: flex; flex-direction: column; gap: 4px; }
.share-options button {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border: none; background: transparent; border-radius: var(--radius);
  cursor: pointer; font-weight: 600; width: 100%; text-align: left;
}
.share-options button:hover { background: var(--bg-page); }
.share-options i { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-page);
  display: flex; align-items: center; justify-content: center; }

.birthday-widget {
  background: #fff; border-radius: var(--radius-lg); padding: 12px 16px;
  margin-bottom: 12px; border: 1px solid var(--border);
}
.birthday-widget h4 { margin: 0 0 8px; font-size: 0.95rem; color: var(--text-muted); }
.birthday-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }

.search-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.search-tab {
  padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 0.9rem;
  border: none; background: var(--bg-page); cursor: pointer; color: var(--text-muted);
}
.search-tab.active { background: var(--jtb-yellow-soft); color: var(--jtb-black); }

.event-card, .saved-card { margin-bottom: 12px; }
.event-date {
  background: var(--jtb-yellow-soft); padding: 8px 12px; border-radius: var(--radius);
  text-align: center; font-weight: 800; min-width: 56px;
}
.event-date small { display: block; font-size: 0.7rem; font-weight: 600; }

.user-profile-header { text-align: center; padding: 24px; }
.user-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  max-width: 100%;
  width: 100%;
}
.profile-actions-primary,
.profile-actions-secondary--desktop {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.profile-actions-primary .btn,
.profile-actions-secondary--desktop .btn {
  min-width: 0;
  white-space: nowrap;
}
.profile-actions-more-wrap {
  position: relative;
  display: none;
}
.profile-actions-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.profile-actions-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  z-index: 10000;
  overflow: hidden;
  padding: 6px 0;
}
.profile-actions-more-menu.hidden { display: none; }
.profile-actions-more-menu.open { display: block; }
.profile-actions-more-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.profile-actions-more-menu button:hover { background: var(--bg-page); }
.profile-actions-more-menu button i { width: 16px; text-align: center; color: var(--text-muted); }

.user-profile-header {
  overflow: visible !important;
}
.user-profile-cover {
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

@media (max-width: 768px) {
  .user-profile-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0 4px;
    position: relative;
    z-index: 20;
    overflow: visible;
  }
  .profile-actions-primary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }
  .profile-actions-primary .btn {
    width: 100%;
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 0.85rem;
  }
  .profile-actions-primary .btn:only-child {
    grid-column: 1 / -1;
  }
  .profile-actions-secondary--desktop {
    display: none !important;
  }
  .profile-actions-more-wrap {
    display: block;
    width: 100%;
    position: relative;
    z-index: 10001;
  }
  .profile-actions-more-btn {
    width: 100%;
  }
  .profile-actions-more-menu.open {
    position: fixed;
    left: 12px;
    right: 12px;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    min-width: 0;
    z-index: 10000;
  }
}

@media (min-width: 769px) {
  .profile-actions-more-wrap {
    display: none !important;
  }
}

.market-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.market-filter {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: #fff; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.market-filter.active { background: var(--jtb-yellow); border-color: var(--jtb-yellow); }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 5000;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90%; max-height: 90%; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 20px; right: 20px; color: #fff; font-size: 2rem;
  border: none; background: transparent; cursor: pointer;
}

.comment-actions {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 28px;
  width: 100%;
}
.comment-actions button {
  border: none;
  background: none;
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  margin-right: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
}
.comment-actions button i { font-size: 0.75rem; }
.comment-actions button:hover { text-decoration: none; background: transparent; }
.comment-like-btn .comment-like-count { font-variant-numeric: tabular-nums; }
.comment-like-btn.liked,
.comment-like-btn.liked i { color: #e41e3f; }
.comment-like-btn:hover { color: #e41e3f; }
.comment-reply-btn .comment-reply-arrow {
  font-size: 0.85em;
  opacity: 0.85;
  line-height: 1;
}
.comment-actions .comment-time {
  margin-left: 0;
  font-weight: 400;
  white-space: nowrap;
}
.comment-actions .comment-options-wrap {
  margin-left: auto;
  opacity: 1;
  position: relative;
  flex-shrink: 0;
}

.group-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 16px 0; }
.group-tab {
  padding: 12px 16px; font-weight: 600; color: var(--text-muted);
  border: none; background: none; cursor: pointer; border-bottom: 3px solid transparent;
}
.group-tab.active { color: var(--jtb-yellow-hover); border-bottom-color: var(--jtb-yellow); }

.post-stats .reaction-icons span { font-size: 0.85rem; margin-right: -4px; }
.post-stats .reactions { display: inline-flex; align-items: center; gap: 4px; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 16px; }
.member-card { text-align: center; padding: 12px; background: var(--bg-page); border-radius: var(--radius); }

/* Facebook-style friends list (profile + user pages) */
.fb-friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-friend-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border, #dddfe2);
  background: var(--bg-card, #fff);
  flex-wrap: wrap;
}

.fb-friend-row-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--jtb-yellow-soft, #fff3bf);
  color: var(--jtb-black, #050505);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  overflow: hidden;
}

.fb-friend-row-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fb-friend-row-main {
  flex: 1 1 160px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fb-friend-row-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text, #050505);
  text-decoration: none;
  line-height: 1.3;
}

.fb-friend-row-name:hover {
  text-decoration: underline;
}

.fb-friend-row-handle {
  font-size: 0.8125rem;
  color: var(--text-muted, #65676b);
  line-height: 1.3;
}

.fb-friend-row-mutual {
  font-size: 0.8125rem;
  color: var(--text-muted, #65676b);
  line-height: 1.3;
}

.fb-friend-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.fb-friend-row-actions .btn {
  padding: 7px 14px;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.fb-friends-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.fb-friends-empty i {
  font-size: 2rem;
  margin-bottom: 10px;
  opacity: 0.6;
}

@media (max-width: 640px) {
  .fb-friend-row {
    align-items: flex-start;
  }
  .fb-friend-row-actions {
    width: 100%;
    margin-left: 0;
    padding-left: 68px;
    justify-content: flex-start;
  }
  .fb-friend-row-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
  }
}

.memories-banner {
  background: linear-gradient(135deg, var(--jtb-yellow-soft), #fff);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 16px;
}
.memories-banner i { font-size: 2rem; color: var(--jtb-yellow-hover); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 8px; }

/* User profile social actions */
.user-social-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  max-width: 100%;
  width: 100%;
  padding: 0 4px;
}

.user-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.user-social-btn--primary {
  background: var(--jtb-yellow, #ffcc00);
  color: var(--jtb-black, #050505);
  border-color: var(--jtb-yellow, #ffcc00);
}
.user-social-btn--primary:hover { filter: brightness(0.96); }

.user-social-btn--outline {
  background: var(--bg-card, #fff);
  color: var(--text, #050505);
  border-color: var(--border, #dddfe2);
}
.user-social-btn--outline:hover { background: var(--bg-page, #f0f2f5); }

.user-social-btn--friends,
.user-social-btn--following {
  background: var(--bg-page, #f0f2f5);
  color: var(--text, #050505);
  border-color: var(--border, #dddfe2);
}
.user-social-btn--friends:hover,
.user-social-btn--following:hover { background: #e4e6eb; }

.user-social-btn--muted {
  background: var(--bg-page, #f0f2f5);
  color: var(--text-muted, #65676b);
  border-color: var(--border, #dddfe2);
}
.user-social-btn--muted:hover {
  background: #e4e6eb;
  color: var(--text, #050505);
}

.user-social-caret {
  font-size: 0.65rem;
  opacity: 0.7;
}

.user-social-dropdown-wrap {
  position: relative;
}

.user-social-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  overflow: hidden;
  padding: 6px 0;
}
.user-social-dropdown.hidden { display: none; }
.user-social-dropdown.open { display: block; }
.user-social-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.user-social-dropdown button:hover { background: var(--bg-page); }

.user-profile-tabs {
  flex-wrap: wrap;
  gap: 4px;
}

/* Direct message modal */
.dm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dm-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dm-modal-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.dm-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.dm-modal-body {
  padding: 0 !important;
  min-height: 280px;
  max-height: min(52vh, 420px);
  display: flex;
  flex-direction: column;
}
.dm-modal-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-page, #f0f2f5);
}
.dm-modal-empty {
  text-align: center;
  margin: auto;
}
.dm-modal-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.4;
  word-break: break-word;
}
.dm-modal-bubble.mine {
  align-self: flex-end;
  background: var(--jtb-yellow, #ffcc00);
  color: var(--jtb-black, #050505);
  border-bottom-right-radius: 4px;
}
.dm-modal-bubble.theirs {
  align-self: flex-start;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.dm-modal-img {
  max-width: 100%;
  border-radius: 12px;
  margin-bottom: 6px;
  display: block;
}
.dm-modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px !important;
  border-top: 1px solid var(--border);
}
.dm-modal-footer .form-control {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.dm-modal-send {
  width: auto;
  padding: 8px 14px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .user-social-actions {
    gap: 6px;
  }
  .user-social-btn {
    padding: 8px 12px;
    font-size: 0.8125rem;
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 3px);
  }
  .user-social-btn--primary {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .user-social-dropdown {
    left: 0;
    transform: none;
    right: auto;
  }
}
