/**
 * Partner public profile — /p/{slug}
 * Grid layout, cover, feed, tabs (earn-px / earn-pp)
 */

.earn-pub-main {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 1rem 2rem;
}

.earn-pub-main .earn-px {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(0, 280px);
  gap: 1.25rem;
  max-width: min(1280px, calc(100vw - 0.75rem));
  margin: 0 auto;
  align-items: start;
}

.earn-px-left {
  position: sticky;
  top: calc(var(--earn-pub-header-h, 64px) + 12px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.earn-px-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 8, 20, 0.75);
}

.earn-px-menu a,
.earn-px-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--soft, #d4d4d4);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.earn-px-menu a.is-active,
.earn-px-menu a:hover,
.earn-px-menu button:hover {
  background: rgba(124, 58, 237, 0.2);
  color: var(--gold, #c9a962);
}

.earn-px-menu svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
}

.earn-px-promo {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 98, 0.25);
  background: linear-gradient(165deg, rgba(28, 12, 48, 0.6), rgba(8, 6, 14, 0.95));
  overflow: hidden;
}

.earn-px-promo picture,
.earn-px-promo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.earn-px-promo-brand {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--gold, #c9a962);
  margin: 0;
}

.earn-px-promo h2 {
  margin: 0.25rem 0;
  font-size: 1rem;
}

.earn-px-promo p {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  color: var(--muted, #a3a3a3);
}

.earn-px-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.earn-px-right {
  position: sticky;
  top: calc(var(--earn-pub-header-h, 64px) + 12px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.earn-px-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 8, 20, 0.82);
  padding: 1rem;
}

.earn-px-head {
  padding: 0;
  overflow: hidden;
}

.earn-px-cover {
  position: relative;
  min-height: 140px;
  max-height: 200px;
  background: linear-gradient(120deg, rgba(88, 28, 135, 0.45), rgba(12, 8, 20, 0.95));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.earn-px-cover.is-default {
  min-height: 160px;
}

.earn-px-cover:not(.is-default) {
  background-image: var(--earn-px-cover);
}

.earn-px-cover-copy {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  font-size: 0.85rem;
  color: #fff;
}

.earn-px-cover-copy strong {
  display: block;
  color: var(--gold, #c9a962);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
}

.earn-px-cover-girl {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(55%, 280px);
  max-height: 100%;
  pointer-events: none;
}

.earn-px-cover-girl img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  object-position: bottom right;
}

.earn-px-id {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1rem;
  margin-top: -3rem;
  position: relative;
  z-index: 2;
}

.earn-px-avatar {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid rgba(12, 8, 20, 0.95);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.earn-px-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: none;
}

.earn-px-post header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.earn-px-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #0c0814;
  background: #22c55e;
}

.earn-px-status--away { background: #eab308; }
.earn-px-status--offline { background: #737373; }

.earn-px-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  padding-bottom: 0.25rem;
}

.earn-px-info {
  padding: 0.75rem 1rem 1rem;
}

.earn-px-name {
  margin: 0 0 0.35rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.earn-px-pill {
  font-size: 0.62rem;
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.25);
  color: #ddd6fe;
}

.earn-px-pill.is-top {
  background: rgba(201, 169, 98, 0.2);
  color: var(--gold, #c9a962);
}

.earn-px-handle,
.earn-px-bio {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--soft, #d4d4d4);
  line-height: 1.5;
}

.earn-px-meta {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted, #a3a3a3);
}

.earn-px-meta li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.earn-px-meta svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

.earn-px-meta a {
  color: #c4b5fd;
  text-decoration: none;
}

.earn-px-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.earn-px-stats dt {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #a3a3a3);
  margin: 0;
}

.earn-px-stats dd {
  margin: 0.15rem 0 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gold, #c9a962);
}

.earn-px-tabs,
.earn-pp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.earn-pp-tab {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #a3a3a3);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.earn-pp-tab.is-active {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(167, 139, 250, 0.35);
  color: #fff;
}

.earn-pp-panel {
  display: none;
}

.earn-pp-panel.is-active {
  display: block;
}

.earn-pp-panel[hidden] {
  display: none !important;
}

.earn-px-post header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.earn-px-post header img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.earn-px-post header strong {
  display: block;
  font-size: 0.88rem;
}

.earn-px-post header span {
  font-size: 0.72rem;
  color: var(--muted, #a3a3a3);
}

.earn-px-text,
.earn-px-quote {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
}

.earn-px-media {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.earn-px-media img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.earn-px-media-bar {
  display: block;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.78rem;
}

.earn-px-post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.75rem;
}

.earn-px-post-actions button,
.earn-px-post-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  border: 0;
  background: transparent;
  color: var(--muted, #a3a3a3);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.earn-px-post-actions svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
}

.earn-px-post-cta {
  margin-left: auto;
  color: var(--gold, #c9a962) !important;
  font-weight: 600;
}

.earn-px-widget h2 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.earn-px-level-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.earn-px-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.earn-px-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #c9a962);
}

.earn-px-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  word-break: break-all;
  margin-bottom: 0.65rem;
}

.earn-px-share {
  display: flex;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.earn-px-share a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--soft, #d4d4d4);
}

.earn-px-products,
.earn-px-badges {
  list-style: none;
  margin: 0;
  padding: 0;
}

.earn-px-products li,
.earn-px-badges li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.earn-px-products img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.earn-pp-cta.earn-agent-cta-band {
  grid-column: 1 / -1;
  max-width: min(1280px, calc(100vw - 0.75rem));
  margin: 1.5rem auto 0;
  text-align: center;
}

/* Public profile: show content immediately (no scroll-reveal blank page) */
[data-earn-public-profile] .earn-reveal {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 1024px) {
  .earn-pub-main .earn-px {
    grid-template-columns: minmax(0, 1fr) minmax(0, 260px);
  }
  .earn-px-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .earn-pub-main .earn-px {
    grid-template-columns: 1fr;
  }
  .earn-px-right {
    position: static;
  }
  .earn-px-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .earn-px-id {
    margin-top: -2.5rem;
  }
  .earn-px-avatar {
    width: 112px;
    height: 112px;
  }
}
