/* Sound Routes migration overrides.
   Loaded after the core, screen, and responsive layers so late stabilization rules
   stay isolated from the main responsive stylesheet while preserving cascade order. */

/* 1.4.0 targeted rating/profile cleanup. */
#profileOverviewGroups .profile-group-role {
  color: var(--text-soft, #5f6f7f) !important;
}

#profileOverviewGroups .profile-group-role svg {
  color: var(--profile-overview-icon-color, #c4872a) !important;
  stroke: currentColor !important;
}


#profileOverviewGender {
  color: var(--profile-dark-blue, #1f5e8c) !important;
}

#profileOverviewGender .profile-gender-value {
  color: var(--profile-dark-blue, #1f5e8c) !important;
}

#profileOverviewGender .profile-gender-icon,
#profileOverviewGender .profile-gender-icon svg {
  color: var(--profile-user-color, var(--brand)) !important;
  stroke: currentColor !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-actions {
  position: static !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  width: auto !important;
  margin-left: auto !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn,
#profileScreen #profileSoundDetailsToggleBtn,
#profileScreen #profileCreateGroupFromGroupsBtn,
#profileScreen #profileAddGroupFromGroupsBtn,
#profileScreen #profileToggleGroupsInfoBtn {
  width: var(--mini-btn-size, 42px) !important;
  height: var(--mini-btn-size, 42px) !important;
  min-width: var(--mini-btn-size, 42px) !important;
  min-height: var(--mini-btn-size, 42px) !important;
  max-width: var(--mini-btn-size, 42px) !important;
  max-height: var(--mini-btn-size, 42px) !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: var(--mini-btn-radius, 14px) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn > span,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn > span,
#profileScreen #profileSoundDetailsToggleBtn > span,
#profileScreen #profileCreateGroupFromGroupsBtn > span,
#profileScreen #profileAddGroupFromGroupsBtn > span,
#profileScreen #profileToggleGroupsInfoBtn > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn svg,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn svg,
#profileScreen #profileSoundDetailsToggleBtn svg,
#profileScreen #profileCreateGroupFromGroupsBtn svg,
#profileScreen #profileAddGroupFromGroupsBtn svg,
#profileScreen #profileToggleGroupsInfoBtn svg {
  width: var(--mini-btn-icon, 19px) !important;
  height: var(--mini-btn-icon, 19px) !important;
  min-width: var(--mini-btn-icon, 19px) !important;
  min-height: var(--mini-btn-icon, 19px) !important;
}

#profileScreen #profileCreateGroupFromGroupsBtn {
  background: var(--action-save-bg, linear-gradient(135deg, #5f8b74, #7c9368)) !important;
}

#profileScreen #profileAddGroupFromGroupsBtn,
#profileScreen #profileSoundDetailsToggleBtn {
  background: var(--action-info-bg, linear-gradient(135deg, #668caf, #4e78a0)) !important;
}

#recordingPanel .trim-summary,
#recordingPanel .player-time.trim-summary {
  color: var(--text-soft, #5f6f7f) !important;
}

#recordingPanel #trimSummary > span[data-i18n],
#recordingPanel #audioTimeLabel > span[data-i18n] {
  color: var(--text, #27313d) !important;
}

#recordingPanel .trim-label,
#recordingPanel .trim-time-value,
#recordingPanel .trim-time-value.duration {
  color: var(--recording-user-color, var(--current-user-color, var(--brand))) !important;
}

#recordingPanel #photoField {
  max-width: 100% !important;
  margin: 0 0 var(--panel-gap, 14px) !important;
  justify-self: stretch !important;
}

#recordingPanel #photoField .photo-adjustments {
  max-width: none !important;
}

#completeSoundwalkBtn {
  margin-top: 14px !important;
}

/* 1.4.x targeted group/profile/rating cleanup. */
.entry-rating .entry-rating-star.fractional {
  color: transparent !important;
  background: linear-gradient(
    90deg,
    #c4913e 0 var(--star-fill, 0%),
    rgba(95, 111, 127, .34) var(--star-fill, 0%) 100%
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

.entry-rating.has-local-rating .entry-rating-star.my-rating {
  filter: drop-shadow(0 0 2px rgba(196, 145, 62, .28)) !important;
}

.entry-rating.has-local-rating .entry-rating-star.fractional.my-rating {
  color: transparent !important;
}

#profileTitleRating,
#profileTitleRating .entry-rating,
#profileTitleRating .entry-rating-stars,
#profileTitleRating .entry-rating-star {
  pointer-events: auto !important;
}

#profileOverviewGroups .profile-group-overview-summary {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  color: var(--text-soft, #5f6f7f) !important;
  font-size: .82rem !important;
  font-weight: 830 !important;
  line-height: 1.1 !important;
}

#profileOverviewGroups .profile-group-count-role {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  color: var(--text-soft, #5f6f7f) !important;
}


#profileOverviewGroups .profile-group-role,
#profileOverviewGroups .profile-group-role span,
#profileOverviewGroups .profile-group-paren,
#profileOverviewGroups .profile-group-separator,
#profileOverviewGroups .profile-group-count-role span {
  color: var(--text-soft, #5f6f7f) !important;
}

#profileOverviewSoundwalks .profile-stat-public svg,
#profileOverviewSounds .profile-stat-public svg {
  color: var(--public-color, #4f83a8) !important;
  stroke: currentColor !important;
}

#profileOverviewSoundwalks .profile-stat-private svg,
#profileOverviewSounds .profile-stat-private svg {
  color: var(--private-color, #a7664f) !important;
  stroke: currentColor !important;
}

#profileGroupsList .profile-group-meta-row > strong {
  color: var(--text, #27313d) !important;
  font-weight: 850 !important;
}

#profileGroupViewPanel .profile-group-view-content {
  display: grid !important;
  gap: 18px !important;
  width: 100% !important;
}

#profileGroupViewPanel .profile-group-view-header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: clamp(14px, 2vw, 22px) !important;
  width: 100% !important;
}

#profileGroupViewPanel .profile-group-view-image,
#profileGroupViewPanel .profile-group-view-image img {
  width: clamp(92px, 12vw, 128px) !important;
  height: clamp(92px, 12vw, 128px) !important;
  border-radius: 18px !important;
  object-fit: cover !important;
}

#profileGroupViewPanel .profile-group-view-title {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
}

#profileGroupViewPanel .profile-group-view-kicker {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  color: var(--text-soft, #5f6f7f) !important;
  font-size: .88rem !important;
  font-weight: 850 !important;
}

#profileGroupViewPanel .profile-group-view-kicker svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--profile-overview-icon-color, #c4872a) !important;
}

#profileGroupViewPanel .profile-group-view-title h3 {
  margin: 0 !important;
  color: var(--profile-user-color, var(--brand)) !important;
  font-size: clamp(2rem, 4vw, 3.4rem) !important;
  line-height: 1.02 !important;
}

#profileGroupViewPanel .profile-group-view-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

#profileGroupViewPanel .profile-group-view-grid > div {
  border: 1px solid var(--safe-inner-box-border, var(--line, #d5e0e7)) !important;
  border-radius: var(--radius-md, 16px) !important;
  background: var(--safe-inner-box-bg, var(--surface-soft, #f6f9fb)) !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}


#profileGroupViewPanel .profile-group-view-cell > span:first-child svg {
  color: var(--profile-overview-icon-color, #c4872a) !important;
}

#profileGroupViewPanel .profile-group-member-list {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

@media (max-width: 720px) {
  #profileGroupViewPanel .profile-group-view-header {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  #profileGroupViewPanel .profile-group-view-actions {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
  }
}

/* 1.4.x group view + soundmap filter pass. */
#profileOverviewGroups .profile-group-count-role svg,
#profileOverviewGroups .profile-group-role svg {
  color: var(--profile-overview-icon-color, #c4872a) !important;
  stroke: currentColor !important;
}

#profileOverviewGroups .profile-group-chip {
  border: 1px solid rgba(137, 164, 184, .34) !important;
  background: rgba(255, 255, 255, .82) !important;
  color: var(--text, #27313d) !important;
  cursor: pointer !important;
  font: inherit !important;
}


#profileOverviewGroups .profile-group-chip:hover,
#profileOverviewGroups .profile-group-chip:focus-visible {
  border-color: color-mix(in srgb, var(--profile-overview-icon-color, #c4872a) 42%, var(--line, #d5e0e7)) !important;
  transform: translateY(-1px) !important;
}

#profileGroupViewPanel .profile-group-view-actions-top {
  justify-self: end !important;
  margin-bottom: -2px !important;
}

#profileGroupViewPanel .profile-group-people-row {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px 18px !important;
}

#profileGroupViewPanel .profile-group-people-block {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
}

#profileGroupViewPanel .profile-group-people-block > strong {
  color: var(--text, #27313d) !important;
  font-weight: 850 !important;
}

#profileGroupViewPanel .profile-group-view-footer {
  display: flex !important;
  justify-content: center !important;
}

#profileGroupViewPanel .profile-group-view-ok-btn {
  min-width: 128px !important;
}

#mapFilterPanel {
  display: grid !important;
  gap: 12px !important;
}

#mapFilterPanel.hidden {
  display: none !important;
}

#mapFilterPanel .map-search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: end !important;
}

#mapFilterPanel .map-search-control {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  color: var(--text, #27313d) !important;
  font-weight: 850 !important;
}

#mapFilterPanel .filter-label-icon svg {
  width: 20px !important;
  height: 20px !important;
  color: var(--profile-overview-icon-color, #c4872a) !important;
}

#mapFilterPanel #mapSearchInput {
  width: 100% !important;
  min-width: 0 !important;
}

#mapFilterPanel #mapClearSearchBtn {
  display: none !important;
}

#mapFilterPanel .map-more-filters {
  border: 1px solid rgba(202, 145, 62, .28) !important;
  border-radius: var(--radius-md, 16px) !important;
  background: rgba(255, 250, 242, .58) !important;
  overflow: hidden !important;
}

#mapFilterPanel .map-more-filters-summary {
  display: flex !important;
  align-items: center !important;
  min-height: 46px !important;
  padding: 0 16px !important;
  color: var(--text-soft, #5f6f7f) !important;
  font-weight: 850 !important;
  cursor: pointer !important;
}

#mapFilterPanel .soundmap-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 12px !important;
}

#mapFilterPanel .archive-toggle {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#mapGroupsLegend {
  display: grid !important;
  gap: 8px !important;
  width: 100% !important;
}

#mapGroupsLegend.hidden {
  display: none !important;
}

#mapGroupsLegend .map-legend-section {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

#mapGroupsLegend .map-legend-section-label {
  color: var(--text-soft, #5f6f7f) !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
}

#mapGroupsLegend .map-legend-section-pills {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

#mapGroupsLegend .legend-group-avatar,
#mapGroupsLegend .legend-group-dot {
  display: inline-grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  border: 2px solid #fff !important;
  box-shadow: 0 0 0 1px rgba(137, 164, 184, .38) !important;
}

#mapGroupsLegend .legend-group-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.profile-popup-title-with-privacy,
.route-popup-line .popup-value {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
}

.entry-popup-body,
.profile-popup-body {
  display: block !important;
}

.entry-popup-body .popup-thumb,
.soundwalk-popup-image,
.profile-popup-avatar {
  float: right !important;
  margin: 0 0 8px 12px !important;
}

.entry-popup-meta,
.profile-popup-meta {
  display: block !important;
}

#modeBtn.app-header-action svg {
  color: #fff !important;
  stroke: currentColor !important;
}

@media (max-width: 780px) {
  #mapFilterPanel .soundmap-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 540px) {
  #mapFilterPanel .map-search-control {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  #mapFilterPanel .map-search-control > span[data-i18n] {
    grid-column: 1 / -1 !important;
  }

  #mapFilterPanel .soundmap-filter-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Targeted cleanup pass: profile groups, soundmap filters, and action buttons. */


#mapFilterPanel .map-more-filters-summary {
  gap: 10px !important;
}

#mapFilterPanel .map-more-filters-summary::-webkit-details-marker {
  display: none !important;
}

#mapFilterPanel .map-more-filters-summary::before {
  content: "" !important;
  width: 0 !important;
  height: 0 !important;
  border-top: 5px solid transparent !important;
  border-bottom: 5px solid transparent !important;
  border-left: 7px solid currentColor !important;
  transition: transform .18s ease !important;
}

#mapFilterPanel .map-more-filters[open] .map-more-filters-summary::before {
  transform: rotate(90deg) !important;
}

#mapFilterPanel .map-select-filter-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 12px !important;
}

#mapFilterPanel .map-filter-select-control {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
  color: var(--text, #27313d) !important;
  font-weight: 850 !important;
}

#mapFilterPanel .map-filter-select-control select {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid var(--line, #d5e0e7) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .94) !important;
  color: var(--text, #27313d) !important;
  font-weight: 800 !important;
}

#mapFilterPanel .map-clear-filters-btn {


  align-self: end !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 13px !important;
  font-size: .72rem !important;
  line-height: 1 !important;
}

#mapGroupsLegend {
  margin-top: 2px !important;
  margin-bottom: 8px !important;
}

.user-profile-popup .profile-popup-avatar,
.user-profile-popup .profile-popup-avatar img,
.user-profile-popup .profile-popup-avatar-svg {
  width: 96px !important;
  height: 96px !important;
  border-radius: 16px !important;
}

.user-profile-popup .profile-popup-avatar img {
  object-fit: cover !important;
}

#filenamePreview {
  font-size: .74rem !important;
  line-height: 1.25 !important;
}

#filenamePreview strong,
#filenamePreview .filename-preview-value {
  font-size: inherit !important;
  line-height: inherit !important;
}

:root {


  --sr-small-action-shadow: 0 7px 16px rgba(15, 23, 32, .12);
}

#libraryDetailsToggleBtn,
#profileSoundDetailsToggleBtn,
.profile-title-edit-btn,
.profile-title-delete-btn,
.library-page-btn,
.coordinate-paste-btn,
.coordinate-recenter-btn,
.recording-action-btn,
.popup-mini-action-btn,
.popup-mini-audio-btn,
.preview-history-btn,
.photo-action-btn,
.photo-history-btn,
.map-floating-btn,
#deleteAllArchiveBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sr-small-action-size) !important;
  height: var(--sr-small-action-size) !important;
  min-width: var(--sr-small-action-size) !important;
  min-height: var(--sr-small-action-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius) !important;
  color: #fff !important;
  background-clip: padding-box !important;
  box-shadow: var(--sr-small-action-shadow) !important;
  outline: 0 !important;
}

#libraryDetailsToggleBtn svg,
#profileSoundDetailsToggleBtn svg,
.profile-title-edit-btn svg,
.profile-title-delete-btn svg,
.library-page-btn svg,
.coordinate-paste-btn svg,
.coordinate-recenter-btn svg,
.recording-action-btn svg,
.popup-mini-action-btn svg,
.popup-mini-audio-btn svg,
.preview-history-btn svg,
.photo-action-btn svg,
.photo-history-btn svg,
.map-floating-btn svg,
#deleteAllArchiveBtn svg {
  width: 17px !important;
  height: 17px !important;
  color: #fff !important;
  stroke: #fff !important;
  fill: none !important;
}

#libraryDetailsToggleBtn > span,
#profileSoundDetailsToggleBtn > span,
.profile-title-edit-btn > span,
.profile-title-delete-btn > span,
.library-page-btn > span,
.coordinate-paste-btn > span,
.coordinate-recenter-btn > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.recording-action-btn.play,
.popup-mini-audio-btn.play {
  background: linear-gradient(135deg, #6f9b75, #5f835a) !important;
}

.recording-action-btn.edit,
.popup-mini-action-btn.edit,
.profile-title-edit-btn {
  background: linear-gradient(135deg, #42a58f, #2e8d83) !important;
}

.recording-action-btn.delete,
.popup-mini-action-btn.delete,
.profile-title-delete-btn,
#deleteAllArchiveBtn {
  background: linear-gradient(135deg, #d34848, #bd3539) !important;
}

.recording-action-btn.download,
.popup-mini-action-btn.download {
  background: linear-gradient(135deg, #8c99a4, #71808c) !important;
}

.recording-action-btn.locate,
.recording-action-btn.map,
.popup-mini-action-btn.route-detail,
.map-floating-btn.layers {
  background: linear-gradient(135deg, #786b9f, #5f557f) !important;
}

.recording-action-btn.details,
.popup-mini-action-btn.view,
#libraryDetailsToggleBtn,
#profileSoundDetailsToggleBtn,
.library-page-btn,
.coordinate-paste-btn,
.coordinate-recenter-btn,
.map-floating-btn.recenter {
  background: linear-gradient(135deg, #6b98bf, #557fa8) !important;
}

#capturePhotoBtn,
#uploadPhotoBtn,
.photo-action-btn.upload {
  background: linear-gradient(135deg, #6f9b75, #5f835a) !important;
}

#photoPrevBtn,
#photoNextBtn,
#previewPrevBtn,
#previewNextBtn,
.preview-history-btn {
  background: linear-gradient(135deg, #aeb7c0, #8f9ba6) !important;
}

#clearPhotoBtn,
#previewDeleteBtn,
.photo-action-btn.delete {
  background: linear-gradient(135deg, #d34848, #bd3539) !important;
}

button.btn-icon:not(:where(
  .tab-btn,
  .app-header-action,
  .choice-icon-button,
  .recording-action-btn,
  .popup-mini-action-btn,
  .popup-mini-audio-btn,
  .preview-history-btn,
  .photo-action-btn,
  .photo-history-btn,
  .map-floating-btn,
  .profile-title-edit-btn,
  .profile-title-delete-btn,
  .profile-sound-details-toggle-btn,
  .library-page-btn,
  .coordinate-paste-btn,
  .coordinate-recenter-btn,
  .role-add-btn,
  #signupAddOrganizationBtn,
  #profileAddOrganizationBtn,
  #profileSendGroupRequestBtn,
  #createGroupMemberAddBtn,
  #libraryDetailsToggleBtn,
  #deleteAllArchiveBtn
)) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  min-height: 42px !important;
  min-width: 128px !important;
  max-width: 176px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  font-size: .72rem !important;
  line-height: 1 !important;
}

button.btn-icon:not(:where(
  .tab-btn,
  .app-header-action,
  .choice-icon-button,
  .recording-action-btn,
  .popup-mini-action-btn,
  .popup-mini-audio-btn,
  .preview-history-btn,
  .photo-action-btn,
  .photo-history-btn,
  .map-floating-btn,
  .profile-title-edit-btn,
  .profile-title-delete-btn,
  .profile-sound-details-toggle-btn,
  .library-page-btn,
  .coordinate-paste-btn,
  .coordinate-recenter-btn,
  .role-add-btn,
  #signupAddOrganizationBtn,
  #profileAddOrganizationBtn,
  #profileSendGroupRequestBtn,
  #createGroupMemberAddBtn,
  #libraryDetailsToggleBtn,
  #deleteAllArchiveBtn
)) svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

button.btn-icon:not(:where(
  .tab-btn,
  .app-header-action,
  .choice-icon-button,
  .recording-action-btn,
  .popup-mini-action-btn,
  .popup-mini-audio-btn,
  .preview-history-btn,
  .photo-action-btn,
  .photo-history-btn,
  .map-floating-btn,
  .profile-title-edit-btn,
  .profile-title-delete-btn,
  .profile-sound-details-toggle-btn,
  .library-page-btn,
  .coordinate-paste-btn,
  .coordinate-recenter-btn,
  .role-add-btn,
  #signupAddOrganizationBtn,
  #profileAddOrganizationBtn,
  #profileSendGroupRequestBtn,
  #createGroupMemberAddBtn,
  #libraryDetailsToggleBtn,
  #deleteAllArchiveBtn
)) span {
  font-size: .72rem !important;
  line-height: 1 !important;
}

#recordingPanel .recording-controls {
  display: flex !important;


  flex-wrap: nowrap !important;
  gap: 10px !important;
}

#startRecBtn,
#uploadAudioBtn {
  flex: 0 1 168px !important;
  min-width: 0 !important;
  max-width: 176px !important;
  white-space: normal !important;
}

button.btn-icon:not(.choice-icon-button) svg,
button.btn-icon:not(.choice-icon-button) svg * {
  color: #fff !important;
  stroke: #fff !important;
}

@media (max-width: 780px) {
  #mapFilterPanel .map-select-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 540px) {
  #mapFilterPanel .map-select-filter-grid {
    grid-template-columns: 1fr !important;
  }

  #startRecBtn,
  #uploadAudioBtn {
    flex: 1 1 0 !important;
    max-width: none !important;
    width: auto !important;
  }
}

/* Final button normalization pass. Keep this last so older responsive repairs cannot
   make icon buttons drift in size, border, or icon color again. */


#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn,
#profileScreen #profileSoundDetailsToggleBtn,
#profileScreen #profileCreateGroupFromGroupsBtn,
#profileScreen #profileAddGroupFromGroupsBtn,
#profileScreen #profileToggleGroupsInfoBtn,
#profileGroupViewPanel .profile-group-view-actions .profile-title-edit-btn,
#profileGroupViewPanel .profile-group-view-actions .profile-title-delete-btn,
#profileGroupViewPanel .profile-group-view-actions .btn-icon,
.main-header-actions .app-header-action.btn-icon,
.header-admin-row .app-header-action.btn-icon,
.hero-header-actions .app-header-action.btn-icon,
.embedded-header-content .main-header-actions .app-header-action.btn-icon,
.map-floating-controls .map-floating-btn,
.map-floating-controls .btn-icon,
#libraryDetailsToggleBtn,
#profileSoundDetailsToggleBtn,
#deleteAllArchiveBtn,
.btn-delete-all.btn-icon,
.library-page-btn,
.coordinate-paste-btn,
.coordinate-recenter-btn,
.recording-action-btn,
.popup-mini-action-btn,
.popup-mini-audio-btn,
.preview-history-btn,
.photo-action-btn,
.photo-history-btn,
.map-floating-btn,
.map-clear-search-btn,
.card-actions .btn-icon,
.entry-actions .btn-icon,
.profile-group-edit-btn,
.profile-group-delete-btn {
  width: var(--sr-small-action-size) !important;
  height: var(--sr-small-action-size) !important;
  min-width: var(--sr-small-action-size) !important;
  min-height: var(--sr-small-action-size) !important;
  max-width: var(--sr-small-action-size) !important;
  max-height: var(--sr-small-action-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius) !important;
  outline: 0 !important;
  color: #fff !important;
  box-shadow: 0 7px 16px rgba(15, 23, 32, .12) !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn svg,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn svg,
#profileScreen #profileSoundDetailsToggleBtn svg,
#profileScreen #profileCreateGroupFromGroupsBtn svg,
#profileScreen #profileAddGroupFromGroupsBtn svg,
#profileScreen #profileToggleGroupsInfoBtn svg,
#profileGroupViewPanel .profile-group-view-actions .btn-icon svg,
.main-header-actions .app-header-action.btn-icon svg,
.header-admin-row .app-header-action.btn-icon svg,
.hero-header-actions .app-header-action.btn-icon svg,
.embedded-header-content .main-header-actions .app-header-action.btn-icon svg,
.map-floating-controls .map-floating-btn svg,
.map-floating-controls .btn-icon svg,
#libraryDetailsToggleBtn svg,
#profileSoundDetailsToggleBtn svg,
#deleteAllArchiveBtn svg,
.btn-delete-all.btn-icon svg,
.library-page-btn svg,
.coordinate-paste-btn svg,
.coordinate-recenter-btn svg,
.recording-action-btn svg,
.popup-mini-action-btn svg,
.popup-mini-audio-btn svg,
.preview-history-btn svg,
.photo-action-btn svg,
.photo-history-btn svg,
.map-floating-btn svg,
.map-clear-search-btn svg,
.card-actions .btn-icon svg,
.entry-actions .btn-icon svg,
.profile-group-edit-btn svg,
.profile-group-delete-btn svg {
  width: var(--sr-small-action-icon) !important;
  height: var(--sr-small-action-icon) !important;
  min-width: var(--sr-small-action-icon) !important;
  min-height: var(--sr-small-action-icon) !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileScreen .profile-main-card .intro-title-lockup .profile-title-edit-btn svg *,
#profileScreen .profile-main-card .intro-title-lockup .profile-title-delete-btn svg *,
#profileScreen #profileSoundDetailsToggleBtn svg *,
#profileScreen #profileCreateGroupFromGroupsBtn svg *,
#profileScreen #profileAddGroupFromGroupsBtn svg *,
#profileScreen #profileToggleGroupsInfoBtn svg *,
#profileGroupViewPanel .profile-group-view-actions .btn-icon svg *,
.main-header-actions .app-header-action.btn-icon svg *,
.header-admin-row .app-header-action.btn-icon svg *,
.hero-header-actions .app-header-action.btn-icon svg *,
.embedded-header-content .main-header-actions .app-header-action.btn-icon svg *,
.map-floating-controls .map-floating-btn svg *,
.map-floating-controls .btn-icon svg *,
#libraryDetailsToggleBtn svg *,
#profileSoundDetailsToggleBtn svg *,
#deleteAllArchiveBtn svg *,
.btn-delete-all.btn-icon svg *,
.library-page-btn svg *,
.coordinate-paste-btn svg *,
.coordinate-recenter-btn svg *,
.recording-action-btn svg *,
.popup-mini-action-btn svg *,
.popup-mini-audio-btn svg *,
.preview-history-btn svg *,
.photo-action-btn svg *,
.photo-history-btn svg *,
.map-floating-btn svg *,
.map-clear-search-btn svg *,
.card-actions .btn-icon svg *,
.entry-actions .btn-icon svg *,
.profile-group-edit-btn svg *,
.profile-group-delete-btn svg * {
  color: #fff !important;
  stroke: #fff !important;
}

.button-bar .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn),
.form-actions .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn),
.saved-actions-bar .btn-icon:not(#libraryDetailsToggleBtn):not(#deleteAllArchiveBtn),
.auth-login-actions .btn-icon,
.auth-reset-actions .btn-icon,
.profile-ok-row .btn-icon,
#mapFilterPanel .map-clear-filters-btn {
  min-height: var(--sr-text-action-height) !important;
  min-width: 128px !important;
  width: auto !important;
  max-width: 176px !important;
  padding: 0 14px !important;
  border-radius: 14px !important;
  gap: 7px !important;
  font-size: var(--sr-text-action-font) !important;
  line-height: 1 !important;
  color: #fff !important;
}

.button-bar .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn) span,
.form-actions .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn) span,
.saved-actions-bar .btn-icon:not(#libraryDetailsToggleBtn):not(#deleteAllArchiveBtn) span,
.auth-login-actions .btn-icon span,
.auth-reset-actions .btn-icon span,
.profile-ok-row .btn-icon span,
#mapFilterPanel .map-clear-filters-btn span:not([aria-hidden="true"]) {
  font-size: var(--sr-text-action-font) !important;
  line-height: 1 !important;
}


#recordingPanel .recording-controls #startRecBtn,
#recordingPanel .recording-controls #uploadAudioBtn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 176px !important;
}

/* Final 1.4.x button and group-view audit fixes. */
:root {
  --sr-small-action-size: 40px;
  --sr-small-action-radius: 13px;
  --sr-small-action-icon: 17px;
  --sr-command-button-font: .72rem;
}

button:not(.entry-rating-star):not(.choice-icon-button):not(.profile-group-chip):not(.profile-group-member-chip):not(.map-popup-group-pill) {
  font-size: var(--sr-command-button-font) !important;
  line-height: 1 !important;
}

button:not(.entry-rating-star):not(.choice-icon-button):not(.profile-group-chip):not(.profile-group-member-chip):not(.map-popup-group-pill) > span:not(.sr-only) {
  font-size: inherit !important;
  line-height: inherit !important;
}

#profileHubActions,
.settings-profile-hub-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
  min-height: 0 !important;
}

#profileHubActions .btn-icon,
.settings-profile-hub-actions .btn-icon {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: var(--button-h, 58px) !important;
  height: var(--button-h, 58px) !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: var(--button-radius, 14px) !important;
  font-size: .76rem !important;
  color: #fff !important;
}

#profileHubActions .btn-icon svg,
.settings-profile-hub-actions .btn-icon svg {
  width: 17px !important;
  height: 17px !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileGroupsPanel .profile-groups-toolbar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

#profileGroupsPanel .profile-groups-toolbar .btn-icon,
#profileGroupViewPanel .profile-group-view-actions-top .btn-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sr-small-action-size) !important;
  height: var(--sr-small-action-size) !important;
  min-width: var(--sr-small-action-size) !important;
  min-height: var(--sr-small-action-size) !important;
  max-width: var(--sr-small-action-size) !important;
  max-height: var(--sr-small-action-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius) !important;
  box-shadow: var(--sr-small-action-shadow, 0 7px 16px rgba(15, 23, 32, .12)) !important;
  color: #fff !important;
  overflow: hidden !important;
}

#profileGroupsPanel .profile-groups-toolbar .btn-icon > span:not(.sr-only),
#profileGroupViewPanel .profile-group-view-actions-top .btn-icon > span:not(.sr-only) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#profileGroupsPanel .profile-groups-toolbar .btn-icon svg,
#profileGroupViewPanel .profile-group-view-actions-top .btn-icon svg,
button.btn-icon:not(.choice-icon-button):not(.entry-rating-star):not(.profile-group-member-chip):not(.profile-group-chip):not(.map-popup-group-pill) svg{
  width: var(--sr-small-action-icon) !important;
  height: var(--sr-small-action-icon) !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileGroupViewPanel .profile-group-view-actions-top:empty {
  display: none !important;
}

#profileGroupViewPanel .profile-group-view-actions-top {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  margin: -2px 0 2px !important;
}

#profileGroupViewPanel .profile-group-view-grid > div {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;

  gap: 8px 12px !important;
}

#profileGroupViewPanel .profile-group-view-cell-label {


  min-width: 0 !important;
  color: var(--text-soft, #5f6f7f) !important;
  font-weight: 850 !important;
}


#profileGroupViewPanel .profile-group-view-cell-label svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--profile-overview-icon-color, #c4872a) !important;
  stroke: currentColor !important;
}

#profileGroupViewPanel .profile-group-view-cell .profile-overview-value {
  display: block !important;
  margin-top: 0 !important;
  color: var(--safe-profile-value, var(--profile-dark-blue, #1f5e8c)) !important;
  font-weight: 760 !important;
}

#profileGroupViewPanel .profile-group-people-stack {

  gap: 9px !important;
  min-width: 0 !important;
}

#profileGroupViewPanel .profile-group-people-line {


  min-width: 0 !important;
}

#profileGroupViewPanel .profile-group-people-value,
#profileGroupViewPanel .profile-group-member-name {
  color: var(--safe-profile-value, var(--profile-dark-blue, #1f5e8c)) !important;
  font-weight: 760 !important;
}

.leaflet-container .leaflet-popup-content {
  width: min(380px, calc(100vw - 42px)) !important;
}

.popup-side-actions {
  gap: 6px !important;
  padding-right: 20px !important;
}

.entry-popup,
.route-popup {
  max-width: 100% !important;
}

.map-popup-group-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 24px !important;
  max-width: 100% !important;
  padding: 2px 8px 2px 3px !important;
  border: 1px solid rgba(137, 164, 184, .38) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .9) !important;
  color: var(--safe-profile-value, var(--profile-dark-blue, #1f5e8c)) !important;
  font-size: .7rem !important;
  font-weight: 850 !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}

.map-popup-group-pill-avatar,
.map-popup-group-pill-avatar img {
  width: 19px !important;
  height: 19px !important;
  border-radius: 999px !important;
}

.map-popup-group-pill-avatar {
  overflow: hidden !important;
  flex: 0 0 19px !important;
  background: #eef4f7 !important;
}

.map-popup-group-pill-avatar img {
  display: block !important;
  object-fit: cover !important;
}

@media (max-width: 520px) {
  .leaflet-container .leaflet-popup-content {
    width: min(340px, calc(100vw - 28px)) !important;
  }

  .popup-side-actions {
    padding-right: 18px !important;
  }
}

/* Absolute final square-icon audit: beat older image-editor and form selectors. */
#authScreen .photo-action-btn,
#authScreen .preview-history-btn,
#profileScreen .photo-action-btn,
#profileScreen .preview-history-btn,
#introScreen .photo-action-btn,
#introScreen .preview-history-btn,
#recordingPanel .photo-action-btn,
#recordingPanel .preview-history-btn,
#recordingPanel .coordinate-paste-btn,
#recordingPanel .coordinate-recenter-btn,
#mapPanel .map-clear-search-btn,
#profileGroupsPanel #profileCreateGroupFromGroupsBtn,
#profileGroupsPanel #profileAddGroupFromGroupsBtn,
#profileGroupsPanel #profileToggleGroupsInfoBtn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sr-small-action-size) !important;
  height: var(--sr-small-action-size) !important;
  min-width: var(--sr-small-action-size) !important;
  min-height: var(--sr-small-action-size) !important;
  max-width: var(--sr-small-action-size) !important;
  max-height: var(--sr-small-action-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius) !important;
  color: #fff !important;
  box-shadow: var(--sr-small-action-shadow, 0 7px 16px rgba(15, 23, 32, .12)) !important;
  overflow: hidden !important;
}

#authScreen .photo-action-btn svg,
#authScreen .preview-history-btn svg,
#profileScreen .photo-action-btn svg,
#profileScreen .preview-history-btn svg,
#introScreen .photo-action-btn svg,
#introScreen .preview-history-btn svg,
#recordingPanel .photo-action-btn svg,
#recordingPanel .preview-history-btn svg,
#recordingPanel .coordinate-paste-btn svg,
#recordingPanel .coordinate-recenter-btn svg,
#mapPanel .map-clear-search-btn svg,
#profileGroupsPanel #profileCreateGroupFromGroupsBtn svg,
#profileGroupsPanel #profileAddGroupFromGroupsBtn svg,
#profileGroupsPanel #profileToggleGroupsInfoBtn svg{
  width: var(--sr-small-action-icon) !important;
  height: var(--sr-small-action-icon) !important;
  min-width: var(--sr-small-action-icon) !important;
  min-height: var(--sr-small-action-icon) !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileScreen #profileGroupsPanel button#profileCreateGroupFromGroupsBtn,
#profileScreen #profileGroupsPanel button#profileAddGroupFromGroupsBtn,
#profileScreen #profileGroupsPanel button#profileToggleGroupsInfoBtn,
#mainScreen #mapPanel button#mapClearSearchBtn {
  box-sizing: border-box !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
}

#authScreen button.preview-history-btn.delete,
#authScreen button.preview-history-btn.reset,
#authScreen button.preview-history-btn.redo,
#authScreen button.preview-history-btn.nav,
#profileScreen button.preview-history-btn.delete,
#profileScreen button.preview-history-btn.reset,
#profileScreen button.preview-history-btn.redo,
#profileScreen button.preview-history-btn.nav,
#introScreen button.preview-history-btn.delete,
#introScreen button.preview-history-btn.reset,
#introScreen button.preview-history-btn.redo,
#introScreen button.preview-history-btn.nav,
#recordingPanel button.preview-history-btn.delete,
#recordingPanel button.preview-history-btn.reset,
#recordingPanel button.preview-history-btn.redo,
#recordingPanel button.preview-history-btn.nav,
#recordingPanel button.photo-history-btn.delete,
#recordingPanel button.photo-history-btn.reset,
#recordingPanel button.photo-history-btn.redo,
#recordingPanel button.photo-history-btn.nav {
  box-sizing: border-box !important;
  width: var(--sr-image-editor-control-size, 40px) !important;
  height: var(--sr-image-editor-control-size, 40px) !important;
  min-width: var(--sr-image-editor-control-size, 40px) !important;
  min-height: var(--sr-image-editor-control-size, 40px) !important;
  max-width: var(--sr-image-editor-control-size, 40px) !important;
  max-height: var(--sr-image-editor-control-size, 40px) !important;
  padding: 0 !important;
  border-width: 0 !important;
  border-style: solid !important;
  outline: 0 !important;
}

/* Final pass: common small buttons, upload-image tools, Library toggle, and wrapped Greek labels. */
:root {
  --sr-small-action-size: 38px;
  --sr-small-action-radius: 12px;
  --sr-small-action-icon: 16px;
  --sr-text-action-height: 46px;
  --sr-text-action-font: .68rem;
}

#libraryDetailsToggleBtn,
#profileSoundDetailsToggleBtn,
.profile-title-edit-btn,
.profile-title-delete-btn,
.library-page-btn,
.coordinate-paste-btn,
.coordinate-recenter-btn,
.recording-action-btn,
.popup-mini-action-btn,
.popup-mini-audio-btn,
.preview-history-btn,
.photo-action-btn,
.photo-history-btn,
.map-floating-btn,
#deleteAllArchiveBtn,
#profileGroupsPanel #profileCreateGroupFromGroupsBtn,
#profileGroupsPanel #profileAddGroupFromGroupsBtn,
#profileGroupsPanel #profileToggleGroupsInfoBtn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sr-small-action-size) !important;
  height: var(--sr-small-action-size) !important;
  min-width: var(--sr-small-action-size) !important;
  min-height: var(--sr-small-action-size) !important;
  max-width: var(--sr-small-action-size) !important;
  max-height: var(--sr-small-action-size) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius) !important;
  color: #fff !important;
  box-shadow: var(--sr-small-action-shadow, 0 7px 16px rgba(15, 23, 32, .12)) !important;
  overflow: hidden !important;
}

#libraryDetailsToggleBtn svg,
#profileSoundDetailsToggleBtn svg,
.profile-title-edit-btn svg,
.profile-title-delete-btn svg,
.library-page-btn svg,
.coordinate-paste-btn svg,
.coordinate-recenter-btn svg,
.recording-action-btn svg,
.popup-mini-action-btn svg,
.popup-mini-audio-btn svg,
.preview-history-btn svg,
.photo-action-btn svg,
.photo-history-btn svg,
.map-floating-btn svg,
#deleteAllArchiveBtn svg,
#profileGroupsPanel #profileCreateGroupFromGroupsBtn svg,
#profileGroupsPanel #profileAddGroupFromGroupsBtn svg,
#profileGroupsPanel #profileToggleGroupsInfoBtn svg{
  width: var(--sr-small-action-icon) !important;
  height: var(--sr-small-action-icon) !important;
  min-width: var(--sr-small-action-icon) !important;
  min-height: var(--sr-small-action-icon) !important;
  color: #fff !important;
  stroke: #fff !important;
  fill: none !important;
}

.recording-title-line .recording-action-btn.details,
.recording-action-btn.details {
  background: linear-gradient(135deg, #9aa6b0, #7f8b97) !important;
  color: #fff !important;
  border: 0 !important;
}

.recording-actions {
  grid-auto-columns: var(--sr-small-action-size) !important;
  gap: 7px !important;
}

.button-bar .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn),
.form-actions .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn),
.save-entry-actions .btn-icon,
.auth-login-actions .btn-icon,
.auth-reset-actions .btn-icon,
.profile-ok-row .btn-icon,
#mapFilterPanel .map-clear-filters-btn,
.saved-actions-bar .btn-icon:not(#libraryDetailsToggleBtn):not(#deleteAllArchiveBtn):not(.library-page-btn) {
  width: 148px !important;
  min-width: 128px !important;
  max-width: 148px !important;
  min-height: var(--sr-text-action-height) !important;
  height: var(--sr-text-action-height) !important;
  max-height: var(--sr-text-action-height) !important;
  padding: 0 10px !important;
  border-radius: 14px !important;
  gap: 7px !important;
  font-size: var(--sr-text-action-font) !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-align: center !important;
}

.button-bar .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn) > span,
.form-actions .btn-icon:not(.recording-action-btn):not(.preview-history-btn):not(.photo-action-btn):not(.photo-history-btn):not(.choice-icon-button):not(.app-header-action):not(.tab-btn) > span,
.save-entry-actions .btn-icon > span,
.auth-login-actions .btn-icon > span,
.auth-reset-actions .btn-icon > span,
.profile-ok-row .btn-icon > span,
#mapFilterPanel .map-clear-filters-btn span:not([aria-hidden="true"]),
.saved-actions-bar .btn-icon:not(#libraryDetailsToggleBtn):not(#deleteAllArchiveBtn):not(.library-page-btn) > span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: var(--sr-text-action-font) !important;
  line-height: 1.05 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: center !important;
}

#recordingPanel .recording-controls {
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

#recordingPanel .recording-controls #startRecBtn,
#recordingPanel .recording-controls #uploadAudioBtn {
  flex: 0 0 148px !important;
  width: 148px !important;
  max-width: 148px !important;
}

.saved-actions-bar {
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

#recordingsList .group-badge {
  justify-self: start !important;
  margin: 0 0 7px 0 !important;
  padding: 4px 8px 4px 5px !important;
  border: 1px solid rgba(137, 164, 184, .42) !important;
  background: rgba(255,255,255,.94) !important;
  color: #46525f !important;
  box-shadow: none !important;
}

#recordingsList .group-badge-label {
  color: #697785 !important;
}

#recordingsList .group-badge-value {
  color: var(--text, #25303a) !important;
}

.recording-meta-context-box {
  display: contents !important;
}

.ui-image-editor .photo-adjust-control .photo-adjust-label svg,
.auth-image-field.ui-image-editor .photo-adjust-control .photo-adjust-label svg,
.photo-crop-layout .photo-adjust-control .photo-adjust-label svg {
  color: currentColor !important;
  stroke: currentColor !important;
}

.ui-image-editor .photo-zoom-control .photo-adjust-label,
.auth-image-field.ui-image-editor .photo-zoom-control .photo-adjust-label,
.photo-crop-layout .photo-zoom-control .photo-adjust-label {
  color: #8467b2 !important;
}

.ui-image-editor .photo-brightness-control .photo-adjust-label,
.auth-image-field.ui-image-editor .photo-brightness-control .photo-adjust-label,
.photo-crop-layout .photo-brightness-control .photo-adjust-label {
  color: #c48a2c !important;
}

.ui-image-editor .photo-saturation-control .photo-adjust-label,
.auth-image-field.ui-image-editor .photo-saturation-control .photo-adjust-label,
.photo-crop-layout .photo-saturation-control .photo-adjust-label {
  color: #4ca5ad !important;
}

.ui-image-editor .photo-action-btn.upload,
.auth-image-field.ui-image-editor .photo-action-btn.upload,
.photo-crop-layout .photo-action-btn.upload,
#authScreen .photo-action-btn.upload,
#profileScreen .photo-action-btn.upload,
#introScreen .photo-action-btn.upload,
#recordingPanel .photo-action-btn.upload,
#signupPhotoBtn,
#profilePhotoBtn,
#createGroupImageBtn,
#soundwalkUploadPhotoBtn,
#uploadPhotoBtn,
#editSoundImageBtn,
#editSoundwalkImageBtn {
  background: linear-gradient(135deg, #4f9cb2, #2f819d) !important;
}

.ui-image-editor .preview-history-btn.reset,
.ui-image-editor .preview-history-btn.redo,
.ui-image-editor .preview-history-btn.nav,
.ui-image-editor .photo-history-btn.reset,
.ui-image-editor .photo-history-btn.redo,
.ui-image-editor .photo-history-btn.nav,
.auth-image-field.ui-image-editor .preview-history-btn.reset,
.auth-image-field.ui-image-editor .preview-history-btn.redo,
.auth-image-field.ui-image-editor .preview-history-btn.nav,
.photo-crop-layout .preview-history-btn.reset,
.photo-crop-layout .preview-history-btn.redo,
.photo-crop-layout .preview-history-btn.nav,
#authScreen .preview-history-btn.reset,
#authScreen .preview-history-btn.redo,
#authScreen .preview-history-btn.nav,
#profileScreen .preview-history-btn.reset,
#profileScreen .preview-history-btn.redo,
#profileScreen .preview-history-btn.nav,
#introScreen .preview-history-btn.reset,
#introScreen .preview-history-btn.redo,
#introScreen .preview-history-btn.nav,
#recordingPanel .preview-history-btn.reset,
#recordingPanel .preview-history-btn.redo,
#recordingPanel .preview-history-btn.nav {
  background: linear-gradient(135deg, #826fa8, #6a5a93) !important;
}

.ui-image-editor .preview-history-btn.delete,
.ui-image-editor .photo-history-btn.delete,
.auth-image-field.ui-image-editor .preview-history-btn.delete,
.photo-crop-layout .preview-history-btn.delete {
  background: linear-gradient(135deg, #d34c4d, #bd363a) !important;
}

#mapFilterPanel .map-clear-filters-btn {
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  margin-top: 4px !important;
}

/* Final profile/map cleanup pass. Keep these late so old migration layers cannot re-widen buttons or recolor labels. */


#profileHubActions.profile-hub-actions,
.profile-hub-actions:not(.settings-profile-hub-actions),
.profile-hub-actions.settings-profile-hub-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  width: min(100%, var(--content-max, 880px)) !important;
  max-width: var(--content-max, 880px) !important;
  margin-inline: auto !important;
  gap: 10px !important;
  padding: 8px !important;
  align-items: stretch !important;
}

#profileHubActions .btn-icon,
.profile-hub-actions.settings-profile-hub-actions .btn-icon {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: var(--button-h, 58px) !important;
  min-height: var(--button-h, 58px) !important;
  padding: 0 10px !important;
  font-size: .72rem !important;
  line-height: 1.05 !important;
  white-space: normal !important;
}

#profileHubActions .btn-icon > span,
.profile-hub-actions.settings-profile-hub-actions .btn-icon > span {
  font-size: .72rem !important;
  line-height: 1.05 !important;
}

#profileAddGroupPanel .organization-entry-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--sr-small-action-size, 40px) !important;
  gap: 8px !important;
  align-items: center !important;
}

#profileSendGroupRequestBtn,
#createGroupMemberAddBtn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: var(--sr-small-action-size, 40px) !important;
  height: var(--sr-small-action-size, 40px) !important;
  min-width: var(--sr-small-action-size, 40px) !important;
  min-height: var(--sr-small-action-size, 40px) !important;
  max-width: var(--sr-small-action-size, 40px) !important;
  max-height: var(--sr-small-action-size, 40px) !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: var(--sr-small-action-radius, 13px) !important;
  color: #fff !important;
  background: linear-gradient(135deg, #4c9a89, #2f8379) !important;
  box-shadow: var(--sr-small-action-shadow, 0 7px 16px rgba(15, 23, 32, .12)) !important;
}

#profileSendGroupRequestBtn > span,
#createGroupMemberAddBtn > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#profileSendGroupRequestBtn svg,
#createGroupMemberAddBtn svg{
  width: var(--sr-small-action-icon, 17px) !important;
  height: var(--sr-small-action-icon, 17px) !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileOverviewGroups .profile-group-overview-summary,
#profileOverviewGroups .profile-group-count-detail,
#profileOverviewGroups .profile-group-count-role,
#profileOverviewGroups .profile-group-count-role span,
#profileOverviewGroups .profile-group-paren,
#profileOverviewGroups .profile-group-separator,
#profileOverviewGroups .profile-group-role,
#profileOverviewGroups .profile-group-role span,
#profileOverviewGroups .profile-group-role-line {
  color: var(--sr-label-muted) !important;
  font-size: .78rem !important;
}

#profileOverviewGroups .profile-group-count-role svg,
#profileOverviewGroups .profile-group-role svg,
#profileOverviewGroups .profile-group-count-role .sr-icon,
#profileOverviewGroups .profile-group-role .sr-icon {
  color: var(--sr-icon-ochra) !important;
  stroke: currentColor !important;
}

#profileOverviewGroups .profile-group-chip-name {
  color: var(--sr-value-blue) !important;
}

.profile-overview-grid > div > span,
.profile-overview-grid > div > span strong,
.profile-group-view-cell-label,
.profile-group-view-cell-label strong,
.profile-group-people-line > strong,
.recording-meta strong,
.entry-popup-meta strong,
.route-popup-meta strong,
.map-popup-line-label,
.label-row,
.field-label,
label > span:first-child {
  color: var(--sr-label-muted) !important;
  font-size: .86rem !important;
}

.profile-overview-grid > div > span svg,
.profile-group-view-cell-label svg {
  color: var(--sr-icon-ochra) !important;
  stroke: currentColor !important;
}

#profileGroupViewPanel .profile-group-view-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

#profileGroupViewPanel .profile-group-view-grid > div {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px 14px !important;
  min-height: 56px !important;
}

#profileGroupViewPanel .profile-group-view-cell-label {
  flex: 0 0 auto !important;
}

#profileGroupViewPanel .profile-group-view-cell .profile-overview-value,
#profileGroupViewPanel .profile-group-people-value,
#profileGroupViewPanel .profile-group-member-name {
  color: var(--sr-value-blue) !important;
  font-size: .94rem !important;
  font-weight: 780 !important;
}

#profileGroupViewPanel .profile-overview-wide-cell {
  grid-column: 1 / -1 !important;
}


#profileGroupViewPanel .profile-group-people-line {
  display: flex !important;


  flex-wrap: wrap !important;
}

.leaflet-pane.leaflet-popup-pane,
.leaflet-container .leaflet-popup {
  z-index: 2400 !important;
}

.leaflet-control-container,
.map-floating-controls,
.map-floating-btn {
  z-index: 1000 !important;
}

.entry-popup .entry-photo,
.entry-popup .popup-thumb,
.route-popup .entry-photo,
.route-popup .popup-thumb {
  cursor: zoom-in !important;
}

.recording-action-btn.playing,
.recording-action-btn.stop,
.popup-mini-audio-btn.stop,
#playAudioBtn.playing {
  background: linear-gradient(135deg, #d34848, #bd3539) !important;
}

.recording-action-btn.playing svg,
.recording-action-btn.stop svg,
.popup-mini-audio-btn.stop svg,
#playAudioBtn.playing svg {
  display: block !important;
  margin: auto !important;
  transform: none !important;
}

.recording-action-btn.playing svg *,
.recording-action-btn.stop svg *,
.popup-mini-audio-btn.stop svg *,
#playAudioBtn.playing svg * {
  stroke: #fff !important;
}

.saved-diagnostic-strip,
#savedSyncStateIndicator {
  display: none !important;
}

@media (max-width: 640px) {
  #profileGroupViewPanel .profile-group-view-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-06-26 hard repair: profile nav, group details, map popups, image zoom. */
:root {
  --sr-profile-action-bar-width: min(100%, var(--content-max, 880px));
  --sr-label-muted: #6d7884;
  --sr-icon-ochra: #c4872a;
  --sr-value-blue: var(--profile-dark-blue, #1f5e8c);
}

#profileScreen #profileHubActions.profile-hub-actions > button.btn-icon {

  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;


  height: var(--button-h, 58px) !important;
  min-height: var(--button-h, 58px) !important;
  max-height: none !important;
  padding: 0 10px !important;
  border-radius: 14px !important;
  white-space: normal !important;
  text-align: center !important;
  line-height: 1.05 !important;
}

#profileScreen #profileHubActions.profile-hub-actions > button.btn-icon > span {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  color: #fff !important;
  font-size: .7rem !important;
  line-height: 1.05 !important;
}

#profileScreen #profileHubActions.profile-hub-actions > button.btn-icon svg{
  width: 17px !important;
  height: 17px !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileScreen #profileAddGroupPanel .organization-entry-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) var(--sr-small-action-size, 40px) !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

#profileScreen #profileAddGroupPanel #profileAddGroupInput {
  min-width: 0 !important;
  width: 100% !important;
}

#profileScreen #profileAddGroupPanel #profileSendGroupRequestBtn {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  justify-self: end !important;
  flex: 0 0 var(--sr-small-action-size, 40px) !important;
  width: var(--sr-small-action-size, 40px) !important;
  min-width: var(--sr-small-action-size, 40px) !important;
  max-width: var(--sr-small-action-size, 40px) !important;
  height: var(--sr-small-action-size, 40px) !important;
  min-height: var(--sr-small-action-size, 40px) !important;
  max-height: var(--sr-small-action-size, 40px) !important;
  padding: 0 !important;
  border-radius: var(--sr-small-action-radius, 13px) !important;
  background: linear-gradient(135deg, #5d8aae, #4d789f) !important;
  box-shadow: 0 7px 16px rgba(15, 23, 32, .12) !important;
}

#profileScreen #profileAddGroupPanel #profileSendGroupRequestBtn > span {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

#profileScreen #profileAddGroupPanel #profileSendGroupRequestBtn svg{
  width: var(--sr-small-action-icon, 17px) !important;
  height: var(--sr-small-action-icon, 17px) !important;
  color: #fff !important;
  stroke: #fff !important;
}

#profileOverviewGroups,
#profileOverviewGroups .profile-group-overview-summary,
#profileOverviewGroups .profile-group-count-detail,
#profileOverviewGroups .profile-group-count-role,
#profileOverviewGroups .profile-group-count-role span,
#profileOverviewGroups .profile-group-role,
#profileOverviewGroups .profile-group-role span,
#profileOverviewGroups .profile-group-role strong,
#profileOverviewGroups .profile-group-role-line,
#profileOverviewGroups .profile-group-paren,
#profileOverviewGroups .profile-group-separator,
#profileOverviewGroups .profile-group-empty-members {
  color: var(--sr-label-muted) !important;
  font-size: .78rem !important;
  font-weight: 780 !important;
}

#profileOverviewGroups .profile-group-count-role svg,
#profileOverviewGroups .profile-group-count-role svg *,
#profileOverviewGroups .profile-group-role svg,
#profileOverviewGroups .profile-group-role svg *,
#profileOverviewGroups .profile-group-count-role .sr-icon,
#profileOverviewGroups .profile-group-role .sr-icon {
  color: var(--sr-icon-ochra) !important;
  stroke: var(--sr-icon-ochra) !important;
}

#profileOverviewGroups .profile-group-chip,
#profileOverviewGroups .profile-group-chip *,
#profileOverviewGroups .profile-group-chip-name {
  color: var(--sr-value-blue) !important;
}

#profileGroupViewPanel .profile-group-view-grid > .profile-group-view-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  min-height: 64px !important;
}

#profileGroupViewPanel .profile-group-view-cell-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--sr-label-muted) !important;
  font-size: .82rem !important;
  line-height: 1.15 !important;
}

#profileGroupViewPanel .profile-group-view-cell-label strong,
#profileGroupViewPanel .profile-group-people-line > strong {
  color: var(--sr-label-muted) !important;
  font-size: .82rem !important;
  font-weight: 780 !important;
}

#profileGroupViewPanel .profile-group-view-cell-label svg,
#profileGroupViewPanel .profile-group-view-cell-label svg * {
  color: var(--sr-icon-ochra) !important;
  stroke: var(--sr-icon-ochra) !important;
}

#profileGroupViewPanel .profile-group-view-cell .profile-overview-value,
#profileGroupViewPanel .profile-group-people-stack,
#profileGroupViewPanel .profile-group-member-list,
#profileGroupViewPanel .profile-group-people-value,
#profileGroupViewPanel .profile-group-member-name {
  color: var(--sr-value-blue) !important;
  font-size: .94rem !important;
  font-weight: 780 !important;
  line-height: 1.25 !important;
}

#profileGroupViewPanel .profile-overview-wide-cell.profile-group-view-cell {
  grid-column: 1 / -1 !important;
}

#profileGroupViewPanel .profile-group-people-stack {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

#profileGroupViewPanel .profile-group-people-line {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
}

.leaflet-container .leaflet-pane.leaflet-popup-pane {
  z-index: 9000 !important;
}


.leaflet-control-container,
.leaflet-top,
.leaflet-bottom,
.map-floating-controls,
.map-floating-btn {
  z-index: 700 !important;
}

.image-zoom-overlay {
  pointer-events: auto !important;
  z-index: 99998 !important;
}

.image-zoom-clone {
  z-index: 100002 !important;
}

body.image-zoom-active .entry-photo.expanded,
body.image-zoom-active .photo-preview.expanded,
body.image-zoom-active .auth-avatar-preview.expanded,
body.image-zoom-active .profile-group-card-image.expanded,
body.image-zoom-active .profile-soundwalk-image.expanded {
  opacity: 0 !important;
  pointer-events: none !important;
}

body.image-zoom-active .image-zoom-clone,
body.image-zoom-active .image-zoom-clone * {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* 2026-06-26 final repair pass: keep fixes local to map popups, profile nav, and affected action buttons. */
#profileScreen #profileHubActions.profile-hub-actions > .btn-icon {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: 1 1 0 !important;
}

#profileScreen #profileHubActions.profile-hub-actions > .btn-icon.hidden {
  display: none !important;
}

#profileOverviewGroups .profile-group-paren,
#profileOverviewGroups .profile-group-separator,
#profileOverviewGroups .profile-group-role-label,
#profileOverviewGroups .profile-group-role-line,
#profileOverviewGroups .profile-group-empty-members {
  color: var(--sr-label-muted) !important;
  font-size: .78rem !important;
  font-weight: 780 !important;
}

#profileOverviewGroups .profile-group-count-role {
  color: var(--sr-label-muted) !important;
}

#profileOverviewGroups .profile-group-count-number {
  color: var(--sr-value-blue) !important;
  font-size: .82rem !important;
  font-weight: 840 !important;
}

.leaflet-container .leaflet-pane.leaflet-popup-pane,
.leaflet-container .leaflet-popup-pane {
  z-index: 12000 !important;
  pointer-events: auto !important;
}

.leaflet-container .leaflet-popup {
  z-index: 12001 !important;
  pointer-events: auto !important;
}

.leaflet-container .leaflet-popup-content-wrapper,
.leaflet-container .leaflet-popup-content,
.entry-popup,
.route-popup {
  pointer-events: auto !important;
}

.leaflet-control-container,
.leaflet-top,
.leaflet-bottom {
  z-index: 450 !important;
}

.map-floating-controls {
  z-index: 460 !important;
  pointer-events: none !important;
}

.map-floating-controls .map-floating-btn,
.map-floating-controls .btn-icon {
  pointer-events: auto !important;
}

.leaflet-container .leaflet-popup-content:has(.entry-popup) {
  width: min(430px, calc(100vw - 42px)) !important;
  min-width: min(430px, calc(100vw - 42px)) !important;
  max-width: calc(100vw - 42px) !important;
}

.entry-popup {
  width: min(430px, calc(100vw - 42px)) !important;
  min-width: 0 !important;
}

.entry-popup .popup-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 10px !important;
}

.entry-popup .popup-side-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  max-width: 100% !important;
}

.entry-popup .popup-side-actions .popup-mini-action-btn,
.entry-popup .popup-side-actions .popup-mini-audio-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 13px !important;
}

.entry-popup .popup-side-actions .popup-mini-action-btn svg,
.entry-popup .popup-side-actions .popup-mini-audio-btn svg {
  width: 17px !important;
  height: 17px !important;
}

.entry-popup-body.has-image {
  grid-template-columns: minmax(0, 1fr) 86px !important;
  align-items: start !important;
  gap: 12px !important;
}

.entry-popup-body .popup-thumb,
.entry-popup-body .entry-photo.popup-thumb {
  width: 86px !important;
  height: 86px !important;
  border-radius: 14px !important;
}

.entry-popup-meta,
.entry-popup-meta .route-popup-line {
  color: #4f5f70 !important;
  font-size: .82rem !important;
  line-height: 1.32 !important;
  font-weight: 520 !important;
}

.entry-popup-meta .route-popup-line strong,
.entry-popup-meta strong {
  color: #27313d !important;
  font-size: .82rem !important;
  font-weight: 850 !important;
}

.entry-popup-meta .popup-value {
  color: #4f5f70 !important;
  font-size: .82rem !important;
  font-weight: 520 !important;
}

.user-profile-popup .profile-popup-meta .popup-value {
  font-size: .78rem !important;
  line-height: 1.25 !important;
  font-weight: 520 !important;
}

.recording-action-btn.locate,
.recording-action-btn.locate:focus,
.recording-action-btn.locate:focus-visible,
.popup-mini-action-btn.route-detail-btn,
.popup-mini-action-btn.route-detail-btn:focus,
.popup-mini-action-btn.route-detail-btn:focus-visible {
  outline: 0 !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(15, 23, 32, .12) !important;
}

.recording-action-btn.locate::before,
.recording-action-btn.locate::after,
.popup-mini-action-btn.route-detail-btn::before,
.popup-mini-action-btn.route-detail-btn::after {
  display: none !important;
  content: none !important;
}

.recording-action-btn.playing,
.recording-action-btn.stop,
.popup-mini-audio-btn.stop {
  background: linear-gradient(135deg, #d84a4a, #b83434) !important;
}

.recording-action-btn.playing,
.recording-action-btn.stop,
.popup-mini-audio-btn.stop,
#stopAudioBtn {
  display: inline-grid !important;
  place-items: center !important;
}

.recording-action-btn.playing svg,
.recording-action-btn.stop svg,
.popup-mini-audio-btn.stop svg,
#stopAudioBtn svg {
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  transform: none !important;
}

#profileAddGroupPanel .organization-entry-row {
  overflow: visible !important;
}

#profileAddGroupPanel #profileAddGroupInput,
#profileAddGroupPanel #profileAddGroupInput:focus,
#profileAddGroupPanel #profileAddGroupInput:focus-visible {
  outline: 0 !important;
  box-shadow: 0 0 0 2px rgba(93, 138, 174, .22) !important;
}

#profileAddGroupPanel #profileSendGroupRequestBtn {
  overflow: hidden !important;
  clip-path: none !important;
}

#syncStateIndicator:empty,
#syncStateIndicator.hidden,
#syncStateIndicator.sync-off,
#syncStateIndicator[hidden] {
  display: none !important;
}

#introWelcomeImage[role="button"] {
  cursor: pointer !important;
}

#introWelcomeImage[role="button"]:focus-visible {
  outline: 2px solid rgba(93, 138, 174, .55) !important;
  outline-offset: 4px !important;
}

/* Keep the four image-history controls visually identical in every editor. */
:is(#authScreen, #introScreen, #profileScreen, #recordingPanel)
  .ui-image-editor__preview-actions :is(.photo-action-btn, .preview-history-btn, .photo-history-btn) {
  width: var(--sr-image-editor-control-size, 40px) !important;
  height: var(--sr-image-editor-control-size, 40px) !important;
  min-width: var(--sr-image-editor-control-size, 40px) !important;
  min-height: var(--sr-image-editor-control-size, 40px) !important;
  max-width: var(--sr-image-editor-control-size, 40px) !important;
  max-height: var(--sr-image-editor-control-size, 40px) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

/* Older per-editor rules are more specific; lock the upload control to the same box. */
#authScreen #signupPanel #signupPhotoBtn,
#profileScreen #profileEditPanel #profilePhotoBtn,
#profileScreen #profileCreateGroupPanel #createGroupImageBtn,
#profileScreen #profileEditSoundPanel #editSoundImageBtn,
#profileScreen #profileEditSoundwalkPanel #editSoundwalkImageBtn,
#introScreen #soundwalkDetailsBlock #soundwalkUploadPhotoBtn,
#mainScreen #recordingPanel #uploadPhotoBtn {
  width: var(--sr-image-editor-control-size, 40px) !important;
  height: var(--sr-image-editor-control-size, 40px) !important;
  min-width: var(--sr-image-editor-control-size, 40px) !important;
  min-height: var(--sr-image-editor-control-size, 40px) !important;
  max-width: var(--sr-image-editor-control-size, 40px) !important;
  max-height: var(--sr-image-editor-control-size, 40px) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  border-radius: 12px !important;
}

/* Settings has its own focused layout; profile navigation belongs only on profile screens. */
#settingsScreen .settings-profile-hub-actions {
  display: none !important;
}

/* 2026-06-26 targeted repair: live map popups, profile action bar, popup typography, info-toggle icon state. */
#profileScreen #profileHubActions.profile-hub-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 12px !important;
  box-sizing: border-box !important;
}

#profileScreen #profileHubActions.profile-hub-actions > button.btn-icon {
  display: inline-flex !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  justify-self: stretch !important;
  flex: 1 1 0 !important;
}

#profileScreen #profileHubActions.profile-hub-actions > button.btn-icon.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 600px) {
  #profileScreen #profileHubActions.profile-hub-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body.map-popup-open .map-floating-controls,
body.map-popup-open .map-layer-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

body.map-popup-open .leaflet-container .leaflet-pane.leaflet-popup-pane,
body.map-popup-open .leaflet-container .leaflet-popup-pane,
body.map-popup-open .leaflet-container .leaflet-popup {
  z-index: 20000 !important;
}

.leaflet-container .leaflet-popup-content,
.entry-popup,
.route-popup,
.user-profile-popup {
  font-size: .76rem !important;
  line-height: 1.26 !important;
}

.entry-popup .popup-title,
.route-popup .route-popup-title,
.user-profile-popup .profile-popup-title {
  font-size: .92rem !important;
  line-height: 1.12 !important;
}

.entry-popup .entry-rating-summary,
.route-popup .entry-rating-summary,
.user-profile-popup .entry-rating-summary {
  font-size: .76rem !important;
}

.entry-popup-meta,
.entry-popup-meta .route-popup-line,
.entry-popup-meta .popup-value,
.route-popup .route-popup-line,
.route-popup .popup-value,
.user-profile-popup .route-popup-line,
.user-profile-popup .profile-popup-meta {
  font-size: .76rem !important;
  line-height: 1.26 !important;
  font-weight: 520 !important;
}

.entry-popup-meta .route-popup-line strong,
.entry-popup-meta strong,
.route-popup .route-popup-line strong,
.user-profile-popup .route-popup-line strong {
  font-size: .76rem !important;
  line-height: 1.26 !important;
  font-weight: 850 !important;
}

#libraryDetailsToggleBtn:not(.info-open) svg path:nth-of-type(n+3),
#profileSoundDetailsToggleBtn:not(.info-open) svg path:nth-of-type(n+3),
#profileToggleGroupsInfoBtn:not(.info-open) svg path:nth-of-type(n+3),
#libraryDetailsToggleBtn[aria-expanded="false"] svg path:nth-of-type(n+3),
#profileSoundDetailsToggleBtn[aria-expanded="false"] svg path:nth-of-type(n+3),
#profileToggleGroupsInfoBtn[aria-expanded="false"] svg path:nth-of-type(n+3) {
  display: none !important;
}
