:root {
  --hp-bg: #f7f3ee;
  --hp-surface: #ffffff;
  --hp-surface-soft: #fcfaf7;
  --hp-border: #ddd3c6;
  --hp-text: #1b140f;
  --hp-muted: #7f746a;
  --hp-accent: #ffd97b;
  --hp-accent-strong: #0ea669;
  --hp-shadow: 0 10px 30px rgba(41, 25, 7, 0.06);
}

.hp-body {
  background: radial-gradient(circle at top left, #fffdf8 0, var(--hp-bg) 48%, #f2ece4 100%);
  color: var(--hp-text);
  font-family: var(--hc-font-sans, "Plus Jakarta Sans", "Segoe UI", sans-serif);
  overflow-x: hidden;
}

.hp-page {
  padding: 28px 20px 64px;
}

.hp-shell {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 32px;
  align-items: start;
}

.hp-main {
  min-width: 0;
}

.hp-sidebar {
  min-width: 0;
}

.hp-section + .hp-section {
  margin-top: 28px;
}

.hp-section-head,
.hp-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.hp-section-head h2,
.hp-section-bar h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hp-card {
  background: var(--hp-surface);
  border: 1px solid var(--hp-border);
  border-radius: 16px;
  box-shadow: var(--hp-shadow);
}

.hp-activity-card {
  padding: 18px 18px 14px;
  overflow: hidden;
}

.hp-activity-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 2px;
}

.hp-activity-grid-wrap {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: max-content;
  min-width: 100%;
}

.hp-activity-months {
  grid-column: 2;
  display: grid;
  grid-auto-columns: 12px;
  grid-auto-flow: column;
  color: var(--hp-muted);
  font-size: 11px;
  margin: 0 0 6px 2px;
}

.hp-activity-months span {
  white-space: nowrap;
}

.hp-activity-board {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.hp-activity-days {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  row-gap: 3px;
  color: var(--hp-muted);
  font-size: 11px;
  padding-top: 2px;
}

.hp-activity-weeks {
  display: flex;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.hp-activity-week {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  row-gap: 3px;
}

.hp-activity-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #ece8e2;
}

.hp-activity-cell.is-muted {
  opacity: 0.45;
}

.hp-activity-cell.level-1,
.hp-activity-legend .level-1 {
  background: #dbeee5;
}

.hp-activity-cell.level-2,
.hp-activity-legend .level-2 {
  background: #abe0c8;
}

.hp-activity-cell.level-3,
.hp-activity-legend .level-3 {
  background: #59c091;
}

.hp-activity-cell.level-4,
.hp-activity-legend .level-4 {
  background: #0ea669;
}

.hp-activity-foot {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: var(--hp-muted);
  font-size: 12px;
}

.hp-activity-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hp-activity-legend i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #ece8e2;
}

.hp-community-list,
.hp-post-stack {
  display: grid;
  gap: 16px;
}

.hp-feed-shell {
  background: transparent;
}

.hp-feed-shell .cf-post-stream .post-wrapper,
.hp-feed-shell .cf-post-stream .alert-post {
  margin: 0;
}

.hp-feed-shell .cf-post-stream .js_posts_stream > ul,
.hp-feed-shell .cf-post-stream .js_posts_stream > ul > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-feed-shell .cf-post-stream .post {
  margin-bottom: 0;
}

.hp-community-card {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.hp-community-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.hp-community-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.hp-community-copy {
  min-width: 0;
}

.hp-community-copy h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
}

.hp-community-copy p {
  margin: 0;
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-button,
.hp-icon-button,
.hp-page-chip,
.hp-page-link {
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: 0.2s ease;
}

.hp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  color: var(--hp-text);
}

.hp-button-accent {
  background: var(--hp-accent);
}

.hp-button-muted {
  background: #f8f1df;
}

.hp-button-outline {
  background: transparent;
  border-color: var(--hp-border);
}

.hp-button-block {
  width: 100%;
}

.hp-filter-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hp-select-wrap {
  position: relative;
}

.hp-select {
  min-width: 250px;
  min-height: 40px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--hp-border);
  border-radius: 999px;
  background: var(--hp-surface);
  color: var(--hp-muted);
  font-size: 13px;
  outline: none;
  appearance: none;
}

.hp-select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.8px solid var(--hp-muted);
  border-bottom: 1.8px solid var(--hp-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.hp-icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--hp-border);
  background: var(--hp-surface);
  color: var(--hp-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hp-icon-button svg,
.hp-profile-meta-row svg {
  width: 16px;
  height: 16px;
}

.hp-post-card > .post,
.hp-post-card > .card,
.hp-post-card > div {
  border-radius: 16px;
}

.hp-pagination-row {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: var(--hp-muted);
  font-size: 12px;
}

.hp-pagination {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hp-page-link {
  min-height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: var(--hp-muted);
}

.hp-page-link.is-disabled {
  opacity: 0.35;
}

.hp-page-chip {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hp-accent);
  color: var(--hp-text);
}

.hp-profile-card {
  position: sticky;
  top: 96px;
  padding: 26px 18px 18px;
  text-align: center;
}

.hp-profile-avatar-wrap {
  position: relative;
  width: 170px;
  margin: 0 auto 18px;
}

.hp-profile-avatar-ring {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  padding: 7px;
  background: linear-gradient(180deg, #f2f2f2, #cfcfcf);
  box-shadow: inset 0 0 0 2px #fff;
}

.hp-profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid #fff;
}

.hp-profile-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #4a62d5;
  color: #fff;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.hp-profile-points-label {
  color: #4961d4;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hp-profile-level-label {
  color: #4961d4;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.hp-profile-level-copy {
  color: var(--hp-muted);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.hp-profile-help-button {
  position: relative;
  z-index: 2;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid #bbb0a4;
  border-radius: 50%;
  background: #fff;
  color: var(--hp-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.hp-profile-help-button span {
  transform: translateY(-0.5px);
}

.hp-profile-name {
  margin: 10px 0 4px;
  font-size: 31px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hp-profile-handle {
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-profile-bio {
  margin: 14px 0 0;
  text-align: left;
  font-size: 14px;
  line-height: 1.65;
}

.hp-profile-meta {
  margin: 18px 0 10px;
  padding: 16px 0;
  border-top: 1px solid #ece4d8;
  border-bottom: 1px solid #ece4d8;
  display: grid;
  gap: 12px;
}

.hp-profile-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: #50473e;
  font-size: 14px;
}

.hp-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #12a661;
  flex: 0 0 auto;
}

.hp-status-dot.is-offline {
  background: #b9b3a9;
}

.hp-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.hp-profile-stat {
  padding: 6px 8px;
  text-decoration: none;
  color: inherit;
}

.hp-profile-stat + .hp-profile-stat {
  border-left: 1px solid #ece4d8;
}

.hp-profile-stat strong {
  display: block;
  font-size: 21px;
  font-weight: 700;
}

.hp-profile-stat span {
  display: block;
  color: var(--hp-muted);
  font-size: 12px;
}

.hp-profile-points-summary {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbf7f2;
  border: 1px solid #ece4d8;
}

.hp-profile-points-summary strong,
.hp-profile-points-summary span {
  display: block;
}

.hp-profile-points-summary strong {
  font-size: 20px;
  font-weight: 700;
}

.hp-profile-points-summary span {
  color: var(--hp-muted);
  font-size: 12px;
}

.hp-people-list {
  padding: 10px 18px;
}

.hp-person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-decoration: none;
  color: inherit;
}

.hp-person-row + .hp-person-row {
  border-top: 1px solid #ece4d8;
}

.hp-person-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.hp-person-copy strong,
.hp-person-copy span {
  display: block;
}

.hp-person-copy span {
  color: var(--hp-muted);
  font-size: 13px;
}

.hp-empty-state {
  padding: 28px 22px;
  text-align: center;
}

.hp-empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hp-empty-state p {
  margin: 0;
  color: var(--hp-muted);
  font-size: 14px;
}

.hp-media-panel {
  padding: 18px;
}

.hp-modal-open {
  overflow: hidden;
}

.hp-points-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 17, 13, 0.58);
}

.hp-points-modal.is-open {
  display: flex;
}

.hp-points-modal-backdrop {
  position: absolute;
  inset: 0;
}

.hp-points-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-width: 760px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 0;
  padding: 28px 26px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(18, 12, 6, 0.22);
}

.hp-points-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f5efe8;
  color: #50473e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hp-points-modal-close svg {
  width: 16px;
  height: 16px;
}

.hp-points-modal-dialog h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
}

.hp-points-modal-copy h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.hp-points-modal-copy p {
  margin: 0 0 20px;
  color: #3f3934;
  font-size: 16px;
  line-height: 1.7;
}

.hp-points-levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin-top: 10px;
}

.hp-points-level-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  color: #2d2824;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .hp-shell {
    grid-template-columns: 1fr;
  }

  .hp-sidebar {
    order: -1;
  }

  .hp-profile-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .hp-page {
    padding: 18px 14px 92px;
  }

  .hp-section-head h2,
  .hp-section-bar h2 {
    font-size: 20px;
  }

  .hp-section-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .hp-filter-form {
    width: 100%;
  }

  .hp-select-wrap,
  .hp-select {
    width: 100%;
  }

  .hp-community-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .hp-activity-card {
    padding: 16px 12px 12px;
  }

  .hp-activity-scroll {
    margin-right: -2px;
    padding-bottom: 6px;
  }

  .hp-activity-grid-wrap {
    min-width: 660px;
  }

  .hp-activity-months {
    margin-left: 0;
  }

  .hp-community-action {
    grid-column: 1 / -1;
  }

  .hp-button {
    width: 100%;
  }

  .hp-profile-name {
    font-size: 26px;
  }

  .hp-profile-level-label {
    font-size: 12px;
  }

  .hp-profile-level-copy {
    font-size: 11px;
  }

  .hp-pagination-row,
  .hp-activity-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .hp-feed-shell .cf-post-stream .post.cf-feed-v2 .post-body > :not(.cf-feed-v2-root) {
    display: none !important;
  }

  .hp-points-modal-dialog {
    width: 100%;
    max-height: calc(100vh - 18px);
    padding: 24px 18px 20px;
  }

  .hp-points-modal-copy p,
  .hp-points-level-row {
    font-size: 14px;
  }

  .hp-points-levels {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
