/* Member surfaces use the same readable palette as the public template. */
.user-center .profile-header { min-height: 260px; align-items: center; }
.user-center .profile-header .profile-details h1 { color: #18323c !important; text-shadow: none; }
.user-center .profile-header .profile-details p { color: #526c74 !important; }
.user-center .profile-header #bioDisplay { color: #405d66 !important; }
.user-center .profile-header #pointsDisplay { color: #087f79 !important; font-weight: 600; }
.user-center .profile-stats .stat-value { color: #087f79 !important; font-size: 22px; font-weight: 700; line-height: 1.4; }
.user-center .avatar { border-radius: 18px; border: 3px solid #fff; box-shadow: 0 3px 12px #183b341a; }
.user-center .avatar-upload-btn { display: grid; place-items: center; border: 1px solid #dfe9e8; border-radius: 50%; background: #fff; color: #087f79; }
.user-center .btn:not(.btn-primary), .profile-page .btn:not(.btn-primary) { border: 1px solid #c9dfd9; border-radius: 9px; background: #f3f9f6; color: #08746e; }
.user-center .invite-banner { padding: 0; background: transparent; }
.profile-page .profile-banner { position: relative; min-height: 0; height: 140px; padding: 24px 30px; overflow: hidden; background-color: #e3f0e9 !important; background-image: linear-gradient(110deg, #dceee7, #f0f5ec) !important; background-size: cover; background-position: center; border: 1px solid #d5e7e1; border-radius: 16px; }
.profile-page .profile-card { border: 1px solid #dfe9e8; border-radius: 16px; background: #fff; color: #18323c; }
.profile-page .profile-name { color: #18323c !important; }
.profile-page .profile-username, .profile-page .profile-bio { color: #526c74 !important; }
.profile-page .profile-avatar { border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 15px #183b341a; }
.profile-page .profile-meta { border-top: 1px solid #e5eeea; background: transparent !important; color: #526c74 !important; }
.profile-page .meta-item { border-radius: 8px; background: #f3f8f5; }
.profile-page .meta-item a { color: #087f79; }

/* Keep the overlay above the shared navigation, with its own opaque surface. */
#pointsHistoryModal { z-index: 10200; padding: 24px; background: rgb(24 50 60 / 48%); overscroll-behavior: contain; }
#pointsHistoryModal .points-history-content { display: flex; flex-direction: column; width: min(760px, 100%); max-height: min(760px, calc(100vh - 48px)); max-height: min(760px, calc(100dvh - 48px)); overflow: hidden; border: 1px solid #dfe9e8; border-radius: 18px; background: #fff; color: #18323c; box-shadow: 0 24px 80px #123d3438; }
#pointsHistoryModal .points-history-head { position: relative; flex: 0 0 auto; padding: 18px 22px; border-bottom: 1px solid #e6eeeb; background: #fff; }
#pointsHistoryModal .points-history-head h3 { color: #18323c; font-size: 19px; }
#pointsHistoryModal .points-history-close { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; border: 1px solid #dfe9e8; border-radius: 10px; background: #f5f8f6; color: #405d66; font-size: 23px; line-height: 1; }
#pointsHistoryModal .points-history-summary { flex: 0 0 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 22px 0; }
#pointsHistoryModal .points-history-summary span { min-width: 0; padding: 13px 15px; border: 1px solid #e0ece6; border-radius: 11px; background: #f3f8f5; color: #526c74; font-size: 13px; }
#pointsHistoryModal .points-history-summary strong { color: #18323c; font-size: 24px; font-variant-numeric: tabular-nums; }
#pointsHistoryModal .points-history-summary span:first-child strong { color: #087f79; }
#pointsHistoryModal .points-history-note { flex: 0 0 auto; margin: 10px 22px 0; color: #687e85 !important; font-size: 12px; }
#pointsHistoryModal .points-history-list { min-height: 0; overflow: auto; padding: 16px 22px 22px; overscroll-behavior: contain; scrollbar-gutter: stable; }
#pointsHistoryModal .points-history-item { min-width: 0; padding: 15px; border: 1px solid #e2ebe7; border-radius: 11px; background: #fff; }
#pointsHistoryModal .points-history-top { color: #18323c; font-weight: 600; }
#pointsHistoryModal .points-history-top > span:first-child { min-width: 0; overflow-wrap: anywhere; }
#pointsHistoryModal .points-history-delta { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
#pointsHistoryModal .earn { color: #087f79; }
#pointsHistoryModal .spend { color: #b6483b; }
#pointsHistoryModal .points-history-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); color: #60777f; font-size: 13px; }
#pointsHistoryModal .points-history-meta > div { min-width: 0; overflow-wrap: anywhere; }
#pointsHistoryModal .points-history-empty { color: #60777f; background: #f6faf8; border-radius: 10px; }
body:has(.user-center) #shareModal, .profile-page ~ #shareModal { z-index: 10200; background: rgb(24 50 60 / 48%); }
body:has(.user-center) .share-content, .profile-page ~ #shareModal .share-content { border: 1px solid #dfe9e8; border-radius: 16px; background: #fff; color: #18323c; }
.m-point-history-summary span { border: 1px solid #e0ece6; border-radius: 10px; background: #f3f8f5; color: #526c74; }
.m-point-history-summary strong { color: #18323c; font-size: 23px; }
.m-point-history-summary span:first-child strong, .m-point-history-top .earn { color: #087f79; }
.m-point-history-top .spend { color: #b6483b; }
.m-point-history-top em { font-style: normal; font-weight: 650; }
.m-point-history-row { min-width: 0; border: 1px solid #e2ebe7; border-radius: 11px; background: #fff; color: #18323c; }
.m-point-history-row p { color: #60777f; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .user-center .profile-header { min-height: 0; padding: 22px 18px !important; }
  .user-center .profile-info { gap: 16px; }
  .user-center .profile-details { min-width: 0; }
  #pointsHistoryModal { padding: 12px; }
  #pointsHistoryModal .points-history-content { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 15px; }
  #pointsHistoryModal .points-history-head { padding: 14px 16px; }
  #pointsHistoryModal .points-history-summary { gap: 7px; padding: 14px 16px 0; }
  #pointsHistoryModal .points-history-summary span { padding: 10px 7px; text-align: center; font-size: 12px; }
  #pointsHistoryModal .points-history-summary strong { font-size: 22px; }
  #pointsHistoryModal .points-history-note { margin-left: 16px; margin-right: 16px; }
  #pointsHistoryModal .points-history-list { padding: 12px 16px 16px; }
  #pointsHistoryModal .points-history-meta { grid-template-columns: 1fr; }
  #pointsHistoryModal .points-history-item { padding: 12px; }
}

/* Complete the public profile with the same buttons, cards, and cover as the site. */
.profile-page .profile-banner-copy { display: inline-flex; flex-direction: column; gap: 3px; padding: 9px 14px; border: 1px solid #d6e7dd; border-radius: 11px; background: rgb(255 255 255 / 88%); color: #204c43; }
.profile-page .profile-banner-copy span { font-size: 10px; font-weight: 650; letter-spacing: 1.4px; color: #567c6e; }
.profile-page .profile-banner-copy strong { font-size: 20px; font-weight: 700; line-height: 1.5; }
.profile-page .profile-card { margin-top: -24px; padding: 24px; border-color: #dfe9e8 !important; box-shadow: none !important; }
.profile-page .profile-avatar { width: 104px; height: 104px; }
.profile-page .profile-name { margin-top: 10px; font-size: 30px; }
.profile-page .profile-stats { gap: 10px; margin-top: 18px; }
.profile-page .stat-box { min-width: 100px; padding: 10px 18px; border: 1px solid #e0ece6 !important; border-radius: 12px; background: #f3f8f5 !important; box-shadow: none !important; }
.profile-page .stat-number { color: #087f79 !important; font-size: 24px !important; }
.profile-page .stat-label { color: #687e85 !important; font-size: 12px; }
.profile-page .profile-meta { gap: 8px; border-color: #e4eee8 !important; }
.profile-page .meta-item { border: 1px solid #e6eeea; background: #f5f9f6 !important; color: #526c74 !important; font-size: 13px; }
.profile-page .btn, .profile-page .filter-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 18px; border-radius: 9px; font-size: 14px; font-weight: 600; line-height: 1.5; transition: background-color .15s, border-color .15s; box-shadow: none !important; }
.profile-page .btn:not(.btn-primary):not(.btn-danger):not(.btn-neutral), .user-center .btn:not(.btn-primary):not(.btn-danger):not(.btn-neutral), .profile-page .filter-btn { border: 1px solid #cbded6 !important; background: #fff !important; color: #45675d !important; box-shadow: none !important; }
.profile-page .btn.btn-primary, .profile-page .filter-btn.active { border: 1px solid #087f79 !important; background: #087f79 !important; color: #fff !important; box-shadow: none !important; }
.profile-page .btn:not(.btn-primary):not(.btn-danger):not(.btn-neutral):hover, .user-center .btn:not(.btn-primary):not(.btn-danger):not(.btn-neutral):hover, .profile-page .filter-btn:not(.active):hover { border-color: #8dbfb1 !important; background: #eef7f2 !important; color: #08746e !important; }
.profile-page .btn.btn-primary:hover, .profile-page .filter-btn.active:hover { border-color: #066e68 !important; background: #066e68 !important; color: #fff !important; transform: none !important; filter: none !important; }
.profile-page .media-section { padding: 24px; border: 1px solid #dfe9e8 !important; border-radius: 14px; background: #fff !important; box-shadow: none !important; }
.profile-page .media-section .section-title { margin-bottom: 18px; font-size: 23px !important; }
.profile-page .media-filter { justify-content: flex-start; gap: 8px; margin-top: 0; margin-bottom: 18px; }
.profile-page .media-item { border: 1px solid #dfe9e8 !important; border-radius: 12px; background: #fff !important; box-shadow: none !important; }
.profile-page .media-item:hover { border-color: #9bc7b8 !important; box-shadow: 0 5px 16px #183b3410 !important; }
.profile-page .media-info { padding: 14px; }
.profile-page .media-title { color: #18323c !important; font-weight: 600; }
.profile-page .media-meta { color: #687e85 !important; font-size: 12px; }
.profile-page .article-preview-card { flex-direction: column; gap: 8px; padding: 18px; border: 0 !important; background: #f2f7f3 !important; color: #45675d !important; text-align: center; }
.profile-page .article-preview-icon { margin: 0; font-size: 28px; }
.profile-page .article-preview-card > div { font-size: 12px; color: #687e85; }
.profile-page .empty-state { border: 1px dashed #d6e6dc; border-radius: 12px; background: #f8fbf9; }
body:has(.profile-page) #shareModal .btn { min-height: 42px; padding: 9px 18px; border-radius: 9px; border: 1px solid #cbded6 !important; background: #fff !important; color: #45675d !important; box-shadow: none !important; }
body:has(.profile-page) #shareModal .btn.btn-primary { border-color: #087f79 !important; background: #087f79 !important; color: #fff !important; }
.m-modal .m-close { width: 36px; height: 36px; padding: 0; border: 1px solid #dfe9e8; border-radius: 10px; background: #f5f8f6; color: #405d66; font-size: 22px; }
@media(max-width:760px) {
  .profile-page .profile-banner { height: 120px; padding: 16px; }
  .profile-page .profile-banner-copy { padding: 7px 11px; }
  .profile-page .profile-banner-copy strong { font-size: 18px; }
  .profile-page .profile-card { margin: -18px 10px 16px; padding: 20px 14px; }
  .profile-page .profile-avatar { width: 88px; height: 88px; }
  .profile-page .profile-name { font-size: 27px; }
  .profile-page .stat-box { min-width: 0; flex: 1; padding: 10px; }
  .profile-page .media-section { margin: 16px 0; padding: 18px 14px; }
  .profile-page .media-filter { gap: 6px; }
  .profile-page .filter-btn { flex: 1; min-height: 38px; padding: 7px 10px; font-size: 12px; }
}
