/* ERIC FIX 2026-05-21: friend search popup + home anime card cleanup. */
.friend-search-open-btn {
  width: 100%;
  min-height: 48px;
  margin: 14px 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.friend-search-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.friend-search-popup-panel {
  width: min(520px, 100%);
  max-height: min(82dvh, 720px);
  overflow: auto;
}

.friend-search.popup-form {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.friend-search.popup-form input {
  min-width: 0;
  flex: 1;
}

.friend-search-results.popup-results {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.friend-search-popup .friend-row.compact {
  margin: 0;
}
.friend-search.popup-form {
    flex-direction: column;
  }
  .friend-search-popup {
    align-items: end;
    padding: 10px;
  }
  .friend-search-popup-panel {
    width: 100%;
    max-height: 86dvh;
    border-radius: 24px 24px 18px 18px;
  }
/* Home anime cards: remove purple outline and keep cover radius 2px. */
.home-page .anime-card .poster,
.home-page .anime-card .poster-wrap,
section.section .anime-card .poster,
section.section .anime-card .poster-wrap {
  border: 0;
  outline: 0;
  box-shadow: none;
  border-radius: 2px;
}

.home-page .anime-card .poster img,
section.section .anime-card .poster img {
  border-radius: 2px;
}

/* ERIC FINAL FIX 2026-05-26: Friend search is a page, bio chat gating, private chat badges. */
.friend-search-page .friend-hero {
  margin-bottom: 14px;
}

.friend-search-page-form {
  position: sticky;
  top: 72px;
  z-index: 6;
  margin-bottom: 14px;
  background: rgba(14, 14, 22, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.friend-search-results.page-results {
  display: grid;
  gap: 10px;
}

.friend-bookmark-btn.cancelable,
.friend-action-btn.unfollow {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.friend-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ff3860, #ff7b00);
  box-shadow: 0 8px 18px rgba(255, 56, 96, 0.24);
}

.friend-chat-badge[hidden] {
  display: none;
}

.bio-friend-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.bio-private-chat-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bio-private-chat-btn.disabled,
.bio-private-chat-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.bio-chat-locked-note {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0.76;
}

.private-chat-isolated .chat-header-polished {
  gap: 10px;
}

.private-chat-isolated .chat-title-avatar {
  border: 0;
  background: transparent;
  padding: 0;
}

@media (max-width: 640px) {
  .friend-search-page-form {
    top: 64px;
  }

  .friend-row.compact {
    align-items: center;
  }

  .bio-friend-actions > .friend-bookmark-btn,
  .bio-friend-actions > .gacha-btn {
    min-width: 118px;
  }
}
