.char-card {
  transition: border-color 0.15s, background 0.15s;
}

.char-card.active {
  border-color: #ff0090;
  background: rgba(255, 0, 144, 0.05);
}

.char-card:not(.active):hover {
  border-color: #7c3aed;
}

.public-profile {
  max-width: 68rem;
  display: grid;
  gap: 1rem;
}

.public-profile__hero,
.public-profile__panel {
  border: 1px solid rgba(55, 65, 81, 0.9);
  background:
    linear-gradient(180deg, rgba(31, 41, 55, 0.28), rgba(10, 10, 10, 0.42)),
    rgba(17, 17, 17, 0.86);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.public-profile__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 1.25rem;
}

.public-profile__identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.public-profile__avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  border: 1px solid rgba(107, 114, 128, 0.6);
  object-fit: cover;
  background: #0a0a0a;
  flex: 0 0 auto;
}

.public-profile__avatar--fallback {
  display: grid;
  place-items: center;
  color: #a855f7;
  background: rgba(124, 58, 237, 0.16);
  font-size: 1.4rem;
  font-weight: 700;
}

.public-profile h1 {
  color: #e5e5e5;
  font-family: "Cinzel Decorative", serif;
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 0;
}

.public-profile__meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  color: #8b95a5;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
}

.public-profile__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(4.2rem, 1fr));
  gap: 0.5rem;
  min-width: min(28rem, 100%);
}

.public-profile__stats div {
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(55, 65, 81, 0.78);
  border-radius: 6px;
  background: rgba(8, 8, 9, 0.58);
  text-align: right;
}

.public-profile__stats strong,
.public-profile__stats span {
  display: block;
}

.public-profile__stats strong {
  color: #f3f4f6;
  font-family: "Share Tech Mono", monospace;
  font-size: 1.15rem;
  line-height: 1;
}

.public-profile__stats span {
  margin-top: 0.25rem;
  color: #6b7280;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.public-profile__grid {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.public-profile__panel {
  padding: 1rem;
}

.public-profile__panel h2,
.public-profile__activity-group h3 {
  margin: 0;
  color: #8b95a5;
  font-family: "Share Tech Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.public-profile__characters,
.public-profile__activity-group {
  margin-top: 0.85rem;
}

.public-profile__character {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-top: 1px solid rgba(55, 65, 81, 0.5);
  text-decoration: none;
  transition: background 0.15s, padding 0.15s, border-color 0.15s;
}

.public-profile__character:first-child {
  border-top: 0;
  padding-top: 0;
}

.public-profile__character strong,
.public-profile__character span,
.public-profile__character em {
  display: block;
}

.public-profile__character strong {
  color: #e5e5e5;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.92rem;
}

.public-profile__character span,
.public-profile__character em {
  color: #6b7280;
  font-size: 0.78rem;
}

.public-profile__character em {
  color: #a855f7;
  font-style: normal;
  white-space: nowrap;
}

.public-profile__character:hover {
  margin-left: -0.45rem;
  margin-right: -0.45rem;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
  border-radius: 6px;
  background: rgba(107, 114, 128, 0.08);
}

.public-profile__character:hover strong {
  color: #ff0090;
}

.public-profile__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(55, 65, 81, 0.55);
}

.public-profile__section-head span {
  color: #6b7280;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
}

.public-profile__activity-group + .public-profile__activity-group {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(55, 65, 81, 0.55);
}

.public-profile__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(55, 65, 81, 0.38);
  text-decoration: none;
}

.public-profile__activity-group h3 + .public-profile__row {
  border-top: 0;
}

.public-profile__row:hover .public-profile__row-title {
  color: #ff0090;
}

.public-profile__row-title {
  color: #e5e5e5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.public-profile__row-meta {
  color: #64748b;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

.public-profile__empty {
  color: #6b7280;
  font-size: 0.86rem;
  margin: 0.5rem 0 0;
}

@media (max-width: 820px) {
  .public-profile__hero,
  .public-profile__grid {
    grid-template-columns: 1fr;
  }

  .public-profile__hero {
    display: grid;
  }

  .public-profile__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-profile__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .public-profile__row-meta {
    white-space: normal;
  }
}

/* Tokenized polish overrides. */
.public-profile__hero,
.public-profile__panel,
.public-profile__card,
.public-profile__character,
.public-profile__stat {
  border-color: rgb(var(--border-rgb) / 0.84);
  background: var(--panel-gradient), rgb(var(--surface-rgb) / 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow-soft);
}

.public-profile__character:hover strong,
.public-profile__row:hover .public-profile__row-title {
  color: var(--pink);
}

.public-profile__section-head,
.public-profile__activity-group + .public-profile__activity-group,
.public-profile__row {
  border-color: rgb(var(--border-rgb) / 0.55);
}

.public-profile__section-head span,
.public-profile__row-meta,
.public-profile__empty {
  color: var(--muted);
}

.public-profile__row-title {
  color: var(--text-strong);
}

/* Signature people/profile atmosphere. */
.public-profile__hero {
  overflow: hidden;
}

.public-profile__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, rgb(var(--area-accent-rgb) / 0.16), transparent 18rem),
    linear-gradient(90deg, rgb(var(--area-accent-rgb) / 0.2), transparent 42%) top / 100% 1px no-repeat;
  opacity: 0.7;
}

.public-profile__avatar,
.profile-avatar {
  box-shadow: 0 0 0 1px rgb(var(--area-accent-rgb) / 0.28), 0 0 28px rgb(var(--area-accent-rgb) / 0.18);
}

.public-profile__stat:hover,
.public-profile__character:hover {
  border-color: rgb(var(--area-accent-rgb) / 0.42);
}
