/* ============================================================
   v0.4.31: profile sharing - hero share button + public /u/{username} page.
   ============================================================ */
.profile-hero-share-btn {
  position: absolute;
  left: 52px;
  top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.38);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}
.profile-hero-share-btn:hover { background: rgba(0,0,0,0.62); transform: translateY(-1px); }
.profile-hero-share-btn .material-icons { font-size: 16px; }

.pubprofile-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 16px 48px;
  background: radial-gradient(1200px 600px at 50% -10%, #1b1336 0%, #0b0a14 60%);
}
/* The public card has no inner scroll region - lift the 92vh cap so a long
   showcase can never get silently clipped by .profile-card's overflow:hidden. */
.pubprofile-card { width: 100%; max-width: 460px; max-height: none; }
.pubprofile-artifacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 24px 4px;
}
/* Pet block - shown for Plus/Pro users on the public card. */
.pubprofile-pet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px 2px;
}
.pubprofile-pet-emoji { font-size: 32px; line-height: 1; }
.pubprofile-pet-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pubprofile-pet-stage {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pubprofile-pet-xp {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}

/* Rarity-coloured tile so the shareable card actually shows each artifact's rarity. */
.pubprofile-artifact {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 60px;
  max-width: 80px;
  padding: 8px 6px 6px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 2px solid var(--art-tier, #b8c0cc);
  box-shadow: 0 0 16px -3px var(--art-tier, transparent),
              inset 0 0 20px -10px var(--art-tier, transparent);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.pubprofile-artifact-glyph {
  font-size: 26px;
  line-height: 1;
}
.pubprofile-artifact-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--art-tier, #b8c0cc);
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
  max-width: 72px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pubprofile-artifact.tier-common    { --art-tier: #b8c0cc; }
.pubprofile-artifact.tier-uncommon  { --art-tier: #4a90d9; }
.pubprofile-artifact.tier-rare      { --art-tier: #f0c419; }
.pubprofile-artifact.tier-epic      { --art-tier: #e8833a; }
.pubprofile-artifact.tier-legendary { --art-tier: #e0405a; }
.pubprofile-mark {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  padding: 12px 0 16px;
}
.pubprofile-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pubprofile-actions .btn-ghost {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}
.pubprofile-actions .btn-ghost:hover { background: rgba(255,255,255,0.16); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; }
.share-btn .material-icons { font-size: 18px; }
.pubprofile-socials { display: flex; gap: 10px; }
.share-social {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  transition: transform 0.12s, filter 0.15s;
}
.share-social:hover { transform: translateY(-1px); filter: brightness(1.08); }
.share-social.tg { background: #29a9eb; }
.share-social.vk { background: #0077ff; }
.share-social.x { background: #1d1d1f; border: 1px solid rgba(255,255,255,0.2); }
.pubprofile-toast {
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(34,197,94,0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s;
}
.pubprofile-toast.show { opacity: 1; }
.pubprofile-poweredby { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.55); text-decoration: none; }
.pubprofile-poweredby:hover { color: rgba(255,255,255,0.85); }
.pubprofile-missing { margin: auto; text-align: center; color: #e8e4f5; max-width: 360px; }
.pubprofile-missing-glyph { font-size: 54px; }
.pubprofile-missing h1 { margin: 8px 0 6px; font-size: 22px; }


/* v0.7.2.3: narrow screens - the hero streak is absolutely positioned top-right, and a
   ~10-char username plus the tier chip runs straight under it (measured on a 375px
   viewport; pre-existing for any Pro name of that length). Reserve the streak's column
   for the name row; the rows below it sit lower and may use the full width. */
@media (max-width: 480px) {
  .pubprofile-card .profile-name {
    padding-right: 92px;
    flex-wrap: wrap;
    font-size: 14px;
    overflow-wrap: break-word;
  }
}

/* ============================================================
   issue #referral: the join banner on an invite visit (?ref=1).
   Mobile-first, same width contract as .pubprofile-card (100% up to
   460px) so it lines up with the card above/below it at 375px.
   ============================================================ */
.referral-cta-banner {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-card, 14px);
  background: color-mix(in srgb, var(--chronos-violet, #7c5cff) 20%, #17122b);
  border: 1px solid color-mix(in srgb, var(--chronos-violet, #7c5cff) 40%, transparent);
}

.referral-cta-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #f1edff;
}

.referral-cta-btn {
  text-align: center;
  align-self: stretch;
}

@media (min-width: 481px) {
  .referral-cta-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .referral-cta-btn { align-self: auto; flex: 0 0 auto; }
}
