/* Friends hub + compact friend card — cascade late override */

#myPageViewFriends.my-page-section {
  padding-top: 0;
}

#myPageViewFriends .my-page-section-sub {
  display: none !important;
}

#myPageViewFriends .mp-friends-hub {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.18);
  background: rgba(6, 12, 10, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex: 1 1 auto;
  min-height: 0;
}

.my-page-screen[data-mode="friends"] .my-page-center .my-page-view.my-page-view-active {
  overflow: hidden;
}

.my-page-screen[data-mode="friends"] #myPageViewFriends {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.my-page-screen[data-mode="friends"] #myPageViewFriends .mp-friends-hub {
  flex: 1 1 auto;
  min-height: 0;
}

#myPageViewFriends .mp-friends-hub-rail {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 8px 10px 0;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(125, 252, 138, 0.38);
  background:
    linear-gradient(165deg, rgba(8, 22, 16, 0.94), rgba(4, 12, 10, 0.88));
  box-shadow:
    0 0 0 1px rgba(125, 252, 138, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(125, 252, 138, 0.1);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-shrink: 0;
}

#myPageViewFriends .mp-friends-hub-rail:has(.mp-friends-age-filter.is-open) {
  overflow: visible;
  z-index: 40;
}

#myPageViewFriends .mp-friends-hub-rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#myPageViewFriends .mp-friends-hub-rail .mp-friends-filter {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(190, 215, 200, 0.78);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#myPageViewFriends .mp-friends-hub-rail .mp-friends-filter:hover {
  color: #dfffea;
  background: rgba(125, 252, 138, 0.06);
}

#myPageViewFriends .mp-friends-hub-rail .mp-friends-filter.is-active {
  color: #b8ffc8;
  border-color: rgba(125, 252, 138, 0.4);
  background: rgba(125, 252, 138, 0.12);
  box-shadow: 0 0 12px rgba(125, 252, 138, 0.12);
}

#myPageViewFriends .mp-friends-age-filter {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-left: 2px;
  z-index: 5;
}

#myPageViewFriends .mp-friends-age-filter.is-open {
  z-index: 80;
}

#myPageViewFriends .mp-friends-age-select-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#myPageViewFriends .mp-friends-age-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 124px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.38);
  background: linear-gradient(165deg, rgba(10, 28, 20, 0.96), rgba(4, 14, 11, 0.94));
  color: #b8ffc8;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-radius 0.15s ease;
}

#myPageViewFriends .mp-friends-age-filter.is-open .mp-friends-age-trigger {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: rgba(125, 252, 138, 0.22);
}

#myPageViewFriends .mp-friends-age-trigger:hover,
#myPageViewFriends .mp-friends-age-filter.is-open .mp-friends-age-trigger {
  color: #dfffea;
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(125, 252, 138, 0.12);
  box-shadow: 0 0 14px rgba(125, 252, 138, 0.14);
}

#myPageViewFriends .mp-friends-age-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

#myPageViewFriends .mp-friends-age-chevron {
  font-size: 9px;
  opacity: 0.8;
  transition: transform 0.15s ease;
}

#myPageViewFriends .mp-friends-age-filter.is-open .mp-friends-age-chevron {
  transform: rotate(180deg);
}

#myPageViewFriends .mp-friends-age-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  min-width: 100%;
  margin: 0;
  padding: 4px;
  border-radius: 0 0 8px 8px;
  border: 1px solid rgba(125, 252, 138, 0.35);
  border-top: none;
  background: linear-gradient(180deg, rgba(8, 22, 16, 0.98), rgba(3, 10, 8, 0.98));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(125, 252, 138, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 10050;
}

#myPageViewFriends .mp-friends-age-menu[hidden] {
  display: none !important;
}

#myPageViewFriends .mp-friends-age-option {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(190, 215, 200, 0.88);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

#myPageViewFriends .mp-friends-age-option:hover {
  color: #dfffea;
  background: rgba(125, 252, 138, 0.08);
  border-color: rgba(125, 252, 138, 0.18);
}

#myPageViewFriends .mp-friends-age-option.is-active {
  color: #b8ffc8;
  border-color: rgba(125, 252, 138, 0.42);
  background: rgba(125, 252, 138, 0.14);
  box-shadow: 0 0 10px rgba(125, 252, 138, 0.1);
}

#myPageViewFriends .mp-friends-hub-body {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 10px 12px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

#myPageViewFriends .mp-friends-search-row--premium {
  margin: 0;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

#myPageViewFriends .mp-friends-search-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 0 0 36px;
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.32);
  background: rgba(18, 42, 32, 0.55);
  box-shadow: inset 0 0 0 1px rgba(125, 252, 138, 0.06);
}
#myPageViewFriends .mp-friends-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  pointer-events: none;
  color: rgba(160, 220, 180, 0.75);
  font-size: 12px;
  z-index: 1;
}

#myPageViewFriends .mp-friends-search-input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 8px 0 !important;
  font-size: 12px !important;
}

#myPageViewFriends .mp-btn--icon-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  white-space: nowrap;
}

#myPageViewFriends .mp-btn--icon-label span {
  font-size: 11px;
}

/* Compact invite strip */
#myPageViewFriends .mp-friend-invite-bar--compact.is-guest {
  border-color: rgba(125, 252, 138, 0.18);
  background: rgba(8, 18, 14, 0.35);
}
#myPageViewFriends .mp-friend-invite-bar--compact {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(236, 202, 116, 0.22);
  background: linear-gradient(135deg, rgba(48, 38, 12, 0.35), rgba(14, 18, 12, 0.4));
}

#myPageViewFriends .mp-friend-invite-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#myPageViewFriends .mp-friend-invite-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 220, 140, 0.78);
  line-height: 1.2;
}

#myPageViewFriends .mp-friend-invite-code {
  font-size: 13px;
  font-weight: 750;
  color: #ffe7a8;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

#myPageViewFriends .mp-friend-invite-side {
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-left: 8px;
}

#myPageViewFriends .mp-friend-invite-url,
#myPageViewFriends .mp-friend-invite-url-link {
  font-size: 9px;
  color: rgba(200, 210, 190, 0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 96px;
  line-height: 1.2;
}

#myPageViewFriends .mp-friend-invite-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  position: relative;
}

#myPageViewFriends .mp-friend-invite-actions.is-social-open .mp-btn--icon#myPageInviteShare {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(125, 252, 138, 0.14);
  color: #c8ffd4;
}

#myPageViewFriends .mp-friend-invite-socials {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 2px;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(8px);
  transition:
    max-width 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#myPageViewFriends .mp-friend-invite-socials:not([hidden]) {
  max-width: 220px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

#myPageViewFriends .mp-invite-social {
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  opacity: 0;
  transform: scale(0.72) translateY(4px);
  animation: mpInviteSocialPop 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

#myPageViewFriends .mp-friend-invite-socials:not([hidden]) .mp-invite-social:nth-child(1) {
  animation-delay: 0ms;
}
#myPageViewFriends .mp-friend-invite-socials:not([hidden]) .mp-invite-social:nth-child(2) {
  animation-delay: 45ms;
}
#myPageViewFriends .mp-friend-invite-socials:not([hidden]) .mp-invite-social:nth-child(3) {
  animation-delay: 90ms;
}
#myPageViewFriends .mp-friend-invite-socials:not([hidden]) .mp-invite-social:nth-child(4) {
  animation-delay: 135ms;
}
#myPageViewFriends .mp-friend-invite-socials:not([hidden]) .mp-invite-social:nth-child(5) {
  animation-delay: 180ms;
}

@keyframes mpInviteSocialPop {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#myPageViewFriends .mp-invite-social--tg {
  color: #7fd3ff;
  background: rgba(0, 136, 204, 0.18);
  border-color: rgba(0, 170, 255, 0.35);
}
#myPageViewFriends .mp-invite-social--vk {
  color: #9ec5ff;
  background: rgba(76, 117, 163, 0.22);
  border-color: rgba(120, 160, 220, 0.35);
}
#myPageViewFriends .mp-invite-social--max {
  color: #ffb8d8;
  background: rgba(180, 60, 120, 0.18);
  border-color: rgba(255, 120, 180, 0.35);
}
#myPageViewFriends .mp-invite-social--wa {
  color: #8ff0b0;
  background: rgba(37, 180, 90, 0.16);
  border-color: rgba(80, 220, 120, 0.32);
}
#myPageViewFriends .mp-invite-social--ig {
  color: #ffc4ef;
  background: rgba(180, 70, 140, 0.16);
  border-color: rgba(255, 120, 200, 0.32);
}

#myPageViewFriends .mp-invite-social:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 8px rgba(125, 252, 138, 0.25));
}

#myPageViewFriends .mp-friend-invite-actions .mp-btn--icon {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(236, 202, 116, 0.28);
  background: rgba(255, 210, 100, 0.08);
  color: #ffe7a8;
}

#myPageViewFriends .mp-friend-invite-actions .mp-btn--icon:hover {
  background: rgba(255, 210, 100, 0.16);
  border-color: rgba(236, 202, 116, 0.45);
}

/* Highlighted requests — always above list */
#myPageViewFriends .mp-friend-requests-banner {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.5);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(125, 252, 138, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(36, 90, 58, 0.55), rgba(12, 24, 18, 0.72));
  box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.08), 0 8px 22px rgba(0, 0, 0, 0.25);
}

#myPageViewFriends .mp-friend-requests-banner.is-pulse {
  animation: mpFriendReqPulse 2.4s ease-in-out infinite;
}

@keyframes mpFriendReqPulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(125, 252, 138, 0.12), 0 8px 22px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(125, 252, 138, 0.35), 0 8px 26px rgba(40, 120, 70, 0.28);
  }
}

#myPageViewFriends .mp-friend-requests-banner-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9dffb0;
}

#myPageViewFriends .mp-friend-requests-banner-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#myPageViewFriends .mp-friend-requests-banner-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(125, 252, 138, 0.14);
  cursor: pointer;
}

#myPageViewFriends .mp-friend-requests-banner-who {
  min-width: 0;
  font-size: 12px;
  font-weight: 650;
}

#myPageViewFriends .mp-friend-requests-banner-actions {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
}

#myPageViewFriends .mp-friends-search-row--premium,
#myPageViewFriends .mp-friend-invite-bar--compact,
#myPageViewFriends .mp-friend-requests-banner,
#myPageViewFriends .mp-friends-account-hint,
#myPageViewFriends .mp-friend-discover-results {
  flex-shrink: 0;
}

#myPageViewFriends .mp-friends-account-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: linear-gradient(135deg, rgba(48, 38, 12, 0.28), rgba(14, 18, 12, 0.38));
  flex-shrink: 0;
}

#myPageViewFriends .mp-friends-account-hint.is-warn {
  color: rgba(255, 220, 150, 0.92);
}

#myPageViewFriends .mp-friends-account-hint-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

#myPageViewFriends .mp-friends-cloud-login-btn {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.14);
  color: #ffe7a8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#myPageViewFriends .mp-friends-cloud-login-btn:hover {
  background: rgba(251, 191, 36, 0.22);
  border-color: rgba(251, 191, 36, 0.55);
}

#myPageViewFriends .mp-friends-list-label {
  margin: 3px 0 0;
  padding: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(125, 252, 138, 0.78);
  line-height: 1.2;
  flex-shrink: 0;
}

#myPageViewFriends .mp-friends-list-host {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 4px 8px 2px;
}

#myPageViewFriends .mp-friends-list-host .friends-online-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 2px;
  padding-right: 2px;
}

#myPageViewFriends .mp-friends-list-host .friend-row.is-selected,
#myPageViewFriends .mp-friends-list-host .friend-row.friend-row--selected {
  transform: none;
}

#myPageViewFriends .mp-friends-list-host .friend-row:first-child {
  scroll-margin-top: 4px;
}

/* Icon action buttons — never clip «Отклонить» */
.friend-action-btn.friend-action-btn--icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px !important;
  width: auto !important;
  max-width: none !important;
  min-height: 34px !important;
  padding: 6px 10px !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  flex: 0 0 auto !important;
}

.friend-action-btn.friend-action-btn--icon .friend-action-btn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mp-friend-requests-banner-actions .friend-btn-reject-text .friend-action-btn-label,
.mp-friend-request-actions-row .friend-btn-reject-text .friend-action-btn-label,
.friend-row-actions--request .friend-btn-reject-text .friend-action-btn-label,
.mp-friend-requests-banner-actions .friend-btn-cancel-text .friend-action-btn-label,
.mp-friend-request-actions-row .friend-btn-cancel-text .friend-action-btn-label,
.friend-row-actions--request .friend-btn-cancel-text .friend-action-btn-label {
  /* Narrow rails: icon + tooltip; keep Accept text when space allows */
  display: none;
}

.mp-friend-requests-banner-actions .friend-btn-reject-text,
.mp-friend-request-actions-row .friend-btn-reject-text,
.friend-row-actions--request .friend-btn-reject-text,
.mp-friend-requests-banner-actions .friend-btn-cancel-text,
.mp-friend-request-actions-row .friend-btn-cancel-text,
.friend-row-actions--request .friend-btn-cancel-text {
  width: 34px !important;
  min-width: 34px !important;
  padding: 6px 0 !important;
}

.mp-friend-request-actions .friend-btn-accept,
.mp-friend-requests-banner .friend-btn-accept {
  flex: 1 1 auto;
  min-width: 0 !important;
}

.mp-friend-request-actions-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
  width: 100%;
  flex-wrap: nowrap !important;
}

.mp-friend-request-actions-row:has(.friend-btn-cancel-text):not(:has(.friend-btn-accept)) {
  grid-template-columns: 1fr;
}

/* Compact friend card — hug content, no tall empty scroll */
.my-page-screen[data-mode="friends"] .my-page-right #myPageSideFriend {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.my-page-screen[data-mode="friends"] .my-page-right #myPageSideFriend .my-page-friend-panel.mp-friend-card {
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  margin-bottom: 0 !important;
}

.my-page-screen[data-mode="friends"] .mp-friend-card-inner {
  align-items: stretch !important;
  text-align: left !important;
  gap: 8px !important;
  padding: 10px !important;
  overflow: visible !important;
  min-height: 0 !important;
}

.mp-friend-card-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .my-page-friend-avatar-wrap {
  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.mp-friend-card-identity {
  min-width: 0;
  flex: 1;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .my-page-friend-name {
  font-size: 12px !important;
  text-align: left;
  word-break: break-word;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .my-page-friend-meta {
  max-width: none !important;
  text-align: left;
  font-size: 10px !important;
}

.my-page-screen[data-mode="friends"] .mp-friend-card-stats {
  margin: 0 !important;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(125, 252, 138, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.my-page-screen[data-mode="friends"] .mp-friend-card-stats li {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px;
  padding: 2px 0 !important;
  font-size: 10px;
}

.my-page-screen[data-mode="friends"] .mp-friend-card-stats li span:first-child {
  color: rgba(170, 195, 180, 0.65);
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-friend-quick {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px !important;
  margin-top: 2px !important;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-mini-btn--icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 7px 4px !important;
  font-size: 8px !important;
  letter-spacing: 0.03em !important;
  white-space: normal !important;
  line-height: 1.15;
  overflow: hidden;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-mini-btn--icon i {
  font-size: 13px;
  line-height: 1;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-mini-btn--icon span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-mini-btn--album {
  grid-column: 1 / -1;
  flex-direction: row !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  font-size: 10px !important;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-friend-safety {
  margin-top: 0 !important;
  justify-content: center;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-friend-feed-note[hidden],
.my-page-screen[data-mode="friends"] .mp-friend-card .mp-friend-activity-list:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
}

.my-page-screen[data-mode="friends"] .mp-friend-card .mp-friend-activity-list:not(:empty) {
  margin: 0;
  max-height: 120px;
  overflow: auto;
}

@media (max-width: 1100px) {
  #myPageViewFriends .mp-btn--icon-label span {
    display: none;
  }
  .mp-friend-requests-banner-actions .friend-btn-accept .friend-action-btn-label {
    display: none;
  }
  .mp-friend-requests-banner-actions .friend-btn-accept {
    width: 34px !important;
    min-width: 34px !important;
    padding: 6px 0 !important;
  }
}

#myPageViewFriends .mp-friends-search-field:focus-within {
  border-color: rgba(125, 252, 138, 0.55);
  background: rgba(22, 52, 38, 0.7);
}
#myPageViewFriends .mp-friends-search-input::placeholder {
  color: rgba(170, 200, 185, 0.55);
}
#myPageViewFriends .mp-friend-invite-url-link:hover {
  color: #b8ffc8;
  text-decoration: underline;
}

/* Late cascade: settlement hover tip must never be Mapbox white */
.map-hover-tip.mapboxgl-popup .mapboxgl-popup-content,
.map-hover-tip--place .mapboxgl-popup-content,
.map-hover-tip--settlement-glass .mapboxgl-popup-content {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: rgba(230, 255, 240, 0.98) !important;
}
.map-hover-tip.mapboxgl-popup .mapboxgl-popup-tip,
.map-hover-tip--place .mapboxgl-popup-tip,
.map-hover-tip--settlement-glass .mapboxgl-popup-tip {
  display: none !important;
}
.map-settlement-hover-glass {
  background: linear-gradient(
    135deg,
    rgba(8, 22, 16, 0.92) 0%,
    rgba(6, 14, 12, 0.88) 100%
  ) !important;
  border: 1px solid rgba(125, 252, 138, 0.4) !important;
  border-radius: 10px !important;
  padding: 5px 12px 6px !important;
  color: rgba(230, 255, 240, 0.98) !important;
}
.map-settlement-hover-glass__name {
  color: rgba(230, 255, 240, 0.98) !important;
}

