/**
 * HUMANIDAD — product surfaces v1.
 * Presentation-only primitives for future product views.
 * Product view rules are scoped to .humanity-product-v1. The shared overlay
 * contract at the end intentionally covers existing Beta 20 transient layers.
 */

:root {
  --hp-overlay-background: rgba(2, 5, 8, 0.68);
  --hp-overlay-blur: 2px;
  --hp-overlay-border: rgba(215, 182, 108, 0.28);
  --hp-overlay-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.humanity-product-v1 {
  --hp-bg: #050b14;
  --hp-bg-raised: #09131f;
  --hp-bg-soft: #0c1725;
  --hp-panel: rgba(10, 19, 35, 0.78);
  --hp-panel-strong: rgba(8, 17, 30, 0.94);
  --hp-ivory: #f4ecdd;
  --hp-text: #c5ced8;
  --hp-muted: #98a6b7;
  --hp-gold: #d7b66c;
  --hp-gold-strong: #efc76f;
  --hp-gold-soft: #f0d596;
  --hp-life: #8bb8c9;
  --hp-line: rgba(215, 182, 108, 0.28);
  --hp-line-soft: rgba(215, 182, 108, 0.14);
  --hp-focus: rgba(240, 213, 150, 0.82);
  --hp-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --hp-glow: 0 0 32px rgba(215, 182, 108, 0.2);
  --hp-radius-sm: 12px;
  --hp-radius-md: 18px;
  --hp-radius-lg: 24px;
  --hp-radius-xl: 28px;
  --hp-transition: 180ms ease;
  position: relative;
  isolation: isolate;
  min-width: 0;
  color: var(--hp-ivory);
  background:
    radial-gradient(circle at 70% 24%, rgba(36, 63, 91, 0.34), transparent 34%),
    radial-gradient(circle at 18% 16%, rgba(215, 182, 108, 0.08), transparent 26%),
    linear-gradient(180deg, var(--hp-bg-raised), var(--hp-bg));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.humanity-product-v1,
.humanity-product-v1 * {
  box-sizing: border-box;
}

.humanity-product-v1 .humanity-product-shell {
  position: relative;
  z-index: 0;
  width: min(100%, 1500px);
  min-width: 0;
  margin: 0 auto;
  padding: clamp(18px, 2.6vw, 38px);
}

.humanity-product-v1 .humanity-product-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 20%, rgba(215, 182, 108, 0.055), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(139, 184, 201, 0.05), transparent 22%);
}

.humanity-product-v1 .humanity-product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  margin-bottom: clamp(22px, 4vw, 44px);
}

.humanity-product-v1 .humanity-product-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--hp-ivory);
  text-decoration: none;
}

.humanity-product-v1 .humanity-product-mark {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(215, 182, 108, 0.72);
  border-radius: 50%;
  box-shadow: var(--hp-glow), inset 0 0 18px rgba(215, 182, 108, 0.08);
}

.humanity-product-v1 .humanity-product-mark::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -7px;
  bottom: 8px;
  height: 18px;
  border-top: 1px solid rgba(215, 182, 108, 0.72);
  border-radius: 50%;
  transform: rotate(10deg);
}

.humanity-product-v1 .humanity-product-mark::after {
  content: "✦";
  position: absolute;
  top: -7px;
  right: -7px;
  color: var(--hp-gold-strong);
  font-size: 15px;
  text-shadow: 0 0 14px rgba(239, 199, 111, 0.72);
}

.humanity-product-v1 .humanity-product-brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  letter-spacing: 0.14em;
}

.humanity-product-v1 .humanity-product-brand-copy small {
  color: #b99a61;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 8px;
  letter-spacing: 0.3em;
}

.humanity-product-v1 .humanity-product-eyebrow,
.humanity-product-v1 .humanity-product-panel-kicker {
  margin: 0 0 10px;
  color: var(--hp-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-title {
  max-width: 900px;
  margin: 0;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 5vw, 70px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

.humanity-product-v1 .humanity-product-subtitle {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--hp-muted);
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.7;
}

.humanity-product-v1 .humanity-product-surface {
  min-width: 0;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-md);
  background: linear-gradient(180deg, rgba(12, 23, 42, 0.88), rgba(5, 12, 24, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), var(--hp-shadow);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.humanity-product-v1 .humanity-product-surface[data-depth="quiet"] {
  border-color: rgba(255, 255, 255, 0.075);
  background: linear-gradient(180deg, rgba(15, 23, 34, 0.86), rgba(8, 15, 24, 0.86));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

.humanity-product-v1 .humanity-product-workspace {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(230px, 290px);
  gap: 16px;
  width: 100%;
  min-width: 0;
  min-height: 640px;
}

.humanity-product-v1 .humanity-product-side-panel {
  min-width: 0;
  padding: 22px;
}

.humanity-product-v1 .humanity-product-filter-list {
  display: grid;
  gap: 3px;
}

.humanity-product-v1 .humanity-product-filter {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-radius: 8px;
  color: var(--hp-muted);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color var(--hp-transition), background-color var(--hp-transition);
}

.humanity-product-v1 .humanity-product-filter:hover,
.humanity-product-v1 .humanity-product-filter[aria-pressed="true"] {
  color: var(--hp-ivory);
  background: rgba(215, 182, 108, 0.055);
}

.humanity-product-v1 .humanity-product-filter:focus-visible,
.humanity-product-v1 .humanity-product-control:focus-visible,
.humanity-product-v1 .humanity-product-node:focus-visible,
.humanity-product-v1 .humanity-product-action:focus-visible {
  outline: 2px solid var(--hp-focus);
  outline-offset: 3px;
}

.humanity-product-v1 .humanity-product-legend-line {
  display: inline-block;
  flex: 0 0 34px;
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--hp-gold);
}

.humanity-product-v1 .humanity-product-legend-line[data-kind="life"] {
  background: repeating-linear-gradient(90deg, var(--hp-life) 0 5px, transparent 5px 9px);
}

.humanity-product-v1 .humanity-product-legend-line[data-kind="legacy"] {
  background: repeating-linear-gradient(90deg, var(--hp-gold-soft) 0 2px, transparent 2px 8px);
}

.humanity-product-v1 .humanity-product-divider {
  width: 100%;
  height: 1px;
  margin: 14px 0;
  background: var(--hp-line-soft);
}

.humanity-product-v1 .humanity-product-canvas {
  position: relative;
  min-width: 0;
  min-height: 640px;
  overflow: hidden;
  border-radius: var(--hp-radius-md);
  background:
    radial-gradient(ellipse at 50% 42%, rgba(20, 32, 54, 0.5), transparent 62%),
    var(--hp-bg);
}

/* Sin animación permanente: la escena en reposo debe asentarse del todo,
   no respirar/titilar para siempre. Solo se mueve cuando la cámara viaja. */
.humanity-product-v1 .humanity-product-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    radial-gradient(circle, rgba(240, 213, 150, 0.7) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(139, 184, 201, 0.5) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(245, 236, 221, 0.4) 0 1px, transparent 1.2px);
  background-position: 20px 28px, 92px 78px, 156px 18px;
  background-size: 126px 126px, 184px 184px, 210px 210px;
}

.humanity-product-v1 .humanity-product-canvas-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: none;
  cursor: grab;
}

.humanity-product-v1 .humanity-product-canvas-svg:active {
  cursor: grabbing;
}

.humanity-product-v1 [data-humanity-constellation-viewport] {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .humanity-product-v1 [data-humanity-constellation-viewport] {
    transition-duration: 0ms !important;
  }
}

/* Halo suave por rama: agrupa cada constelación familiar sin leerse como radar. */
.humanity-product-v1 .humanity-product-cluster-field {
  fill: url(#humanityClusterField);
  pointer-events: none;
  opacity: 1;
  transition: opacity var(--hp-transition);
}

/* Plano de profundidad por territorio: las ramas grandes quedan "cerca" y
   nítidas; el resto se aleja — constelaciones distintas a distancias
   distintas, no solo personas distintas dentro de una misma nube. */
.humanity-product-v1 .humanity-product-cluster-field[data-cluster-depth="mid"] {
  opacity: 0.6;
}

.humanity-product-v1 .humanity-product-cluster-field[data-cluster-depth="far"] {
  opacity: 0.3;
  filter: blur(1.5px);
}

/* Única guía de profundidad, casi muda — reemplaza los anillos concéntricos. */
.humanity-product-v1 .humanity-product-horizon {
  fill: none;
  stroke: rgba(215, 182, 108, 0.055);
  stroke-width: 1;
  pointer-events: none;
}

.humanity-product-v1 .humanity-product-edge {
  fill: none;
  stroke: var(--hp-gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: 0.5;
  transition: opacity var(--hp-transition), stroke var(--hp-transition), stroke-width var(--hp-transition);
}

.humanity-product-v1 .humanity-product-edge[data-kind="legacy"] {
  stroke: var(--hp-gold-soft);
  stroke-width: 1;
  stroke-dasharray: 2 9;
  opacity: 0.36;
}

.humanity-product-v1 .humanity-product-edge[data-state="dimmed"] {
  opacity: 0.07;
}

.humanity-product-v1 .humanity-product-edge.is-path {
  stroke: var(--hp-life);
  stroke-width: 2.2;
  stroke-dasharray: none;
  opacity: 0.92;
  filter: drop-shadow(0 0 6px rgba(139, 184, 201, 0.55));
}

.humanity-product-v1 .humanity-product-node {
  cursor: pointer;
  opacity: 1;
  transition: opacity var(--hp-transition), filter var(--hp-transition);
}

.humanity-product-v1 .humanity-product-node[data-state="dimmed"] {
  opacity: 0.16;
}

.humanity-product-v1 .humanity-product-node-halo {
  fill: url(#humanityStarHalo);
  stroke: none;
  filter: url(#humanityStarBlur);
  opacity: 0.55;
  transition: opacity var(--hp-transition), filter var(--hp-transition);
}

.humanity-product-v1 .humanity-product-node-core {
  fill: #0a1424;
  stroke: var(--hp-gold);
  stroke-width: 1.5;
  transition: fill var(--hp-transition), stroke var(--hp-transition);
}

.humanity-product-v1 .humanity-product-node-flare {
  stroke: var(--hp-gold-soft);
  stroke-width: 0.8;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--hp-transition);
}

.humanity-product-v1 .humanity-product-node[data-tier="self"] .humanity-product-node-flare {
  opacity: 0.5;
}

/* Familia directa (rama de self): estrella cálida, la más presente tras self. */
.humanity-product-v1 .humanity-product-node[data-central="true"] .humanity-product-node-halo {
  opacity: 0.85;
}

.humanity-product-v1 .humanity-product-node[data-central="true"] .humanity-product-node-core {
  fill: var(--hp-gold-strong);
  stroke: var(--hp-gold-soft);
}

.humanity-product-v1 .humanity-product-node[data-tier="close"] .humanity-product-node-core {
  stroke: var(--hp-gold-soft);
}

/* Ramas más lejanas: estrellas más quietas, frías y pequeñas — se alejan. */
.humanity-product-v1 .humanity-product-node[data-tier="mid"] .humanity-product-node-halo,
.humanity-product-v1 .humanity-product-node[data-tier="far"] .humanity-product-node-halo {
  fill: url(#humanityStarHaloCool);
  opacity: 0.4;
}

.humanity-product-v1 .humanity-product-node[data-tier="mid"] .humanity-product-node-core,
.humanity-product-v1 .humanity-product-node[data-tier="far"] .humanity-product-node-core {
  stroke: var(--hp-muted);
}

.humanity-product-v1 .humanity-product-node[data-kind="legacy"] .humanity-product-node-core {
  fill: #161326;
  stroke: var(--hp-gold-soft);
}

/* Plano de profundidad por territorio (independiente de la distancia a
   self dentro de una misma rama): las ramas grandes quedan nítidas y
   "cerca"; el resto se ve notoriamente más velado, desaturado y
   desenfocado — perspectiva atmosférica real, para que la separación entre
   constelaciones se lea incluso en una imagen quieta, sin depender del
   movimiento. */
.humanity-product-v1 .humanity-product-node[data-cluster-depth="mid"] {
  opacity: 0.82;
  filter: saturate(0.85);
}

.humanity-product-v1 .humanity-product-node[data-cluster-depth="mid"] .humanity-product-node-halo {
  filter: url(#humanityStarBlur) blur(1px);
}

.humanity-product-v1 .humanity-product-node[data-cluster-depth="mid"] .humanity-product-node-core {
  filter: blur(0.3px);
}

.humanity-product-v1 .humanity-product-node[data-cluster-depth="far"] {
  opacity: 0.56;
  filter: saturate(0.55);
}

.humanity-product-v1 .humanity-product-node[data-cluster-depth="far"] .humanity-product-node-halo {
  filter: url(#humanityStarBlur) blur(2.2px);
}

.humanity-product-v1 .humanity-product-node[data-cluster-depth="far"] .humanity-product-node-core {
  filter: blur(0.7px);
}

.humanity-product-v1 .humanity-product-node[data-state="dimmed"][data-cluster-depth="mid"],
.humanity-product-v1 .humanity-product-node[data-state="dimmed"][data-cluster-depth="far"] {
  opacity: 0.16;
}

.humanity-product-v1 .humanity-product-node:hover .humanity-product-node-halo,
.humanity-product-v1 .humanity-product-node:focus-visible .humanity-product-node-halo,
.humanity-product-v1 .humanity-product-node[aria-selected="true"] .humanity-product-node-halo {
  fill: url(#humanityStarHaloCool);
  opacity: 0.9;
}

.humanity-product-v1 .humanity-product-node:hover .humanity-product-node-core,
.humanity-product-v1 .humanity-product-node:focus-visible .humanity-product-node-core,
.humanity-product-v1 .humanity-product-node[aria-selected="true"] .humanity-product-node-core {
  fill: var(--hp-life);
  stroke: #d8ecf3;
  filter: drop-shadow(0 0 9px rgba(139, 184, 201, 0.68));
}

.humanity-product-v1 .humanity-product-node:hover .humanity-product-node-flare,
.humanity-product-v1 .humanity-product-node:focus-visible .humanity-product-node-flare,
.humanity-product-v1 .humanity-product-node[aria-selected="true"] .humanity-product-node-flare {
  opacity: 0.65;
  stroke: var(--hp-life);
}

.humanity-product-v1 .humanity-product-node.is-path .humanity-product-node-core {
  stroke: var(--hp-life);
}

/* Etiquetas: por defecto solo self + rama cercana. El resto aparece con
   zoom, hover, selección o al formar parte del camino resaltado. */
.humanity-product-v1 .humanity-product-node-label {
  fill: var(--hp-ivory);
  font-size: 12px;
  text-anchor: middle;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--hp-transition);
}

.humanity-product-v1 .humanity-product-node[data-tier="self"] .humanity-product-node-label,
.humanity-product-v1 .humanity-product-node[data-tier="close"] .humanity-product-node-label {
  opacity: 0.92;
  font-size: 13px;
}

.humanity-product-v1 [data-zoom-tier="mid"] .humanity-product-node[data-tier="mid"] .humanity-product-node-label,
.humanity-product-v1 [data-zoom-tier="detail"] .humanity-product-node[data-tier="mid"] .humanity-product-node-label,
.humanity-product-v1 [data-zoom-tier="detail"] .humanity-product-node[data-tier="far"] .humanity-product-node-label {
  opacity: 0.78;
}

.humanity-product-v1 .humanity-product-node:hover .humanity-product-node-label,
.humanity-product-v1 .humanity-product-node:focus-visible .humanity-product-node-label,
.humanity-product-v1 .humanity-product-node[aria-selected="true"] .humanity-product-node-label,
.humanity-product-v1 .humanity-product-node.is-path .humanity-product-node-label {
  opacity: 1;
}

.humanity-product-v1 .humanity-product-node[data-state="dimmed"] .humanity-product-node-label {
  opacity: 0 !important;
}

.humanity-product-v1 .humanity-product-node-relation {
  fill: var(--hp-muted);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-anchor: middle;
  pointer-events: none;
}

.humanity-product-v1 .humanity-product-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  background: rgba(2, 7, 17, 0.84);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
}

.humanity-product-v1 .humanity-product-control {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--hp-gold-soft);
  background: rgba(215, 182, 108, 0.08);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
  transition: border-color var(--hp-transition), background-color var(--hp-transition);
}

.humanity-product-v1 .humanity-product-control:hover {
  border-color: rgba(215, 182, 108, 0.36);
  background: rgba(215, 182, 108, 0.15);
}

.humanity-product-v1 .humanity-product-control-label {
  min-width: 46px;
  color: var(--hp-muted);
  font-size: 11px;
  text-align: center;
}

.humanity-product-v1 .humanity-product-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.humanity-product-v1 .humanity-product-metric {
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid var(--hp-line-soft);
  border-radius: var(--hp-radius-sm);
  background: rgba(215, 182, 108, 0.035);
  text-align: center;
}

.humanity-product-v1 .humanity-product-metric strong {
  display: block;
  color: var(--hp-gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}

.humanity-product-v1 .humanity-product-metric span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--hp-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.humanity-product-v1 .humanity-product-selection {
  min-width: 0;
  padding-top: 4px;
}

.humanity-product-v1 .humanity-product-selection-type {
  color: var(--hp-gold);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-selection h2 {
  margin: 8px 0;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.humanity-product-v1 .humanity-product-selection p {
  margin: 0;
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.55;
}

.humanity-product-v1 .humanity-product-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--hp-line-soft);
  border-radius: 14px;
  color: var(--hp-muted);
  background: rgba(215, 182, 108, 0.025);
  font-size: 11px;
  line-height: 1.5;
}

.humanity-product-v1 .humanity-product-note-mark {
  flex: 0 0 auto;
  color: var(--hp-gold);
  font-size: 21px;
  line-height: 1;
}

.humanity-product-v1 .humanity-product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 1.05fr);
  align-items: center;
  gap: clamp(28px, 6vw, 84px);
  min-height: min(760px, 82vh);
}

.humanity-product-v1 .humanity-product-hero-copy {
  min-width: 0;
}

.humanity-product-v1 .humanity-product-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.humanity-product-v1 .humanity-product-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(215, 182, 108, 0.42);
  border-radius: 11px;
  color: var(--hp-ivory);
  background: rgba(11, 20, 33, 0.88);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--hp-transition), background-color var(--hp-transition), color var(--hp-transition), transform var(--hp-transition);
}

.humanity-product-v1 .humanity-product-action:hover {
  border-color: rgba(239, 199, 111, 0.76);
  color: var(--hp-gold-soft);
  transform: translateY(-1px);
}

.humanity-product-v1 .humanity-product-action[data-variant="primary"] {
  border-color: transparent;
  color: #101010;
  background: linear-gradient(180deg, #d7b66c, #9f7534);
}

.humanity-product-v1 .humanity-product-action[data-variant="primary"]:hover {
  color: #080808;
  background: linear-gradient(180deg, #e5c77d, #ad823e);
}

.humanity-product-v1 .humanity-product-orbit-visual {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.humanity-product-v1 .humanity-product-orbit-ring {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(215, 182, 108, 0.48);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(212, 170, 86, 0.16), inset 0 0 60px rgba(212, 170, 86, 0.08);
}

.humanity-product-v1 .humanity-product-orbit-ring::before,
.humanity-product-v1 .humanity-product-orbit-ring::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(215, 182, 108, 0.22);
  border-radius: 50%;
  transform: rotate(64deg);
}

.humanity-product-v1 .humanity-product-orbit-ring::after {
  transform: rotate(-22deg) scaleX(0.42);
}

.humanity-product-v1 .humanity-product-light {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-gold-strong);
  box-shadow: 0 0 12px rgba(255, 200, 90, 0.9), 0 0 30px rgba(217, 157, 54, 0.7);
}

.humanity-product-v1 .humanity-product-light[data-emphasis="pulse"] {
  animation: humanity-product-pulse-v1 2.8s ease-in-out infinite;
}

@keyframes humanity-product-pulse-v1 {
  50% {
    opacity: 0.82;
    transform: scale(1.7);
    box-shadow: 0 0 22px rgba(255, 212, 119, 0.95), 0 0 60px rgba(201, 140, 37, 0.75);
  }
}

@media (max-width: 1050px) {
  .humanity-product-v1 .humanity-product-workspace {
    grid-template-columns: 1fr;
  }

  .humanity-product-v1 .humanity-product-filter-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .humanity-product-v1 .humanity-product-side-panel {
    min-height: 0;
  }

  .humanity-product-v1 .humanity-product-canvas {
    min-height: 590px;
  }

  .humanity-product-v1 .humanity-product-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .humanity-product-v1 .humanity-product-orbit-visual {
    width: min(78vw, 560px);
  }
}

@media (max-width: 680px) {
  .humanity-product-v1 .humanity-product-shell {
    padding: 18px 14px;
  }

  .humanity-product-v1 .humanity-product-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .humanity-product-v1 .humanity-product-title {
    font-size: clamp(34px, 11vw, 48px);
  }

  .humanity-product-v1 .humanity-product-workspace {
    gap: 10px;
  }

  .humanity-product-v1 .humanity-product-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .humanity-product-v1 .humanity-product-side-panel {
    padding: 16px;
  }

  .humanity-product-v1 .humanity-product-canvas {
    min-height: 500px;
  }

  .humanity-product-v1 .humanity-product-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .humanity-product-v1 .humanity-product-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .humanity-product-v1 .humanity-product-action {
    width: 100%;
  }

  .humanity-product-v1 .humanity-product-orbit-visual {
    width: min(92vw, 430px);
  }
}

@media (max-width: 420px) {
  .humanity-product-v1 .humanity-product-metrics {
    grid-template-columns: 1fr;
  }

  .humanity-product-v1 .humanity-product-filter-list {
    grid-template-columns: 1fr;
  }

  .humanity-product-v1 .humanity-product-canvas {
    min-height: 440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .humanity-product-v1 .humanity-product-filter,
  .humanity-product-v1 .humanity-product-edge,
  .humanity-product-v1 .humanity-product-node,
  .humanity-product-v1 .humanity-product-node-halo,
  .humanity-product-v1 .humanity-product-node-core,
  .humanity-product-v1 .humanity-product-control,
  .humanity-product-v1 .humanity-product-action,
  .humanity-product-v1 .humanity-product-light {
    animation: none;
    scroll-behavior: auto;
    transition: none;
  }
}

/* Visual Convergence V1 — shared overlay treatment.
   The page remains legible behind every transient layer; separation comes
   from the dark scrim and the foreground surface, never from heavy blur. */
html body .profile-v50-backdrop,
html body .humanity-avatar-editor-backdrop,
html body .hmemory-overlay,
html body .account-modal.auth-only,
html body .humanidad-stability-modal,
html body .claim-place-modal,
html body .v34-rebuild-backdrop,
html body .safe-onboarding,
html body .humanity-sheet-backdrop.open {
  background: var(--hp-overlay-background) !important;
  backdrop-filter: blur(var(--hp-overlay-blur)) !important;
  -webkit-backdrop-filter: blur(var(--hp-overlay-blur)) !important;
}

/* The signed-in account is a full-screen product surface, not a backdrop. */
html body .account-modal.open:not(.auth-only) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body .profile-v50-editor,
html body .humanity-avatar-editor-dialog,
html body .hmemory-sheet,
html body .account-modal.auth-only .social-shell,
html body .claim-place-shell,
html body .humanidad-stability-panel,
html body .v34-rebuild-panel,
html body .safe-onboarding-card,
html body .person-drawer,
html body .humanidad-search-profile-drawer {
  border-color: var(--hp-overlay-border) !important;
  box-shadow: var(--hp-overlay-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html body .ht-drawer-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/**
 * Etapa 4 — Home premium (namespaced additions).
 * Reusa el visual orbital ya definido arriba (orbit-visual/-ring/-light)
 * dentro de la tarjeta .beta20-home-cover del Inicio real. Puramente
 * decorativo: ningún dato de personas se dibuja aquí.
 */
.beta20-home-cover.humanity-product-v1 .humanity-product-orbit-visual {
  width: min(72%, 260px);
  margin: 0 auto 14px;
}

.beta20-home-cover.humanity-product-v1 .humanity-product-light {
  background: var(--hp-gold-strong);
}

@keyframes humanity-product-orbit-drift-v1 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.beta20-home-cover.humanity-product-v1 .humanity-product-orbit-ring {
  animation: humanity-product-orbit-drift-v1 90s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .beta20-home-cover.humanity-product-v1 .humanity-product-light[data-emphasis="pulse"],
  .beta20-home-cover.humanity-product-v1 .humanity-product-orbit-ring {
    animation: none;
  }
}

/**
 * Transición ligera Inicio <-> Constelación. No hay transition posible sobre
 * un salto display:none -> block, así que se usa una animation de entrada:
 * arranca sola cada vez que switchAccountView() (ya existente, sin cambios)
 * agrega .active y el navegador pinta el elemento por primera vez.
 */
@keyframes humanity-product-view-enter-v1 {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.account-view.humanity-product-v1.active[data-view="home"],
.account-view.humanity-product-v1.active[data-view="constellation"] {
  animation: humanity-product-view-enter-v1 240ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .account-view.humanity-product-v1.active[data-view="home"],
  .account-view.humanity-product-v1.active[data-view="constellation"] {
    animation: none;
  }
}

/**
 * La vista Constelación ya lleva .humanity-product-v1 en su propia sección.
 * Inicio no puede llevar el estilo base completo de .humanity-product-v1
 * (pisaría el fondo/color del contenido legacy de Beta 20 que aún vive ahí:
 * feed de actividad, panel de conectar, composer, etc.), así que se le
 * agrega la clase solo para poder encapsular sus selectores nuevos bajo
 * .humanity-product-v1 — y aquí se neutralizan explícitamente las
 * propiedades de base que no debe heredar ese contenido legacy. Los bloques
 * nuevos (.beta20-home-hero, .beta20-home-premium-extra) llevan su propia
 * .humanity-product-v1 con sus propios valores explícitos, así que no
 * dependen de esta herencia y no se ven afectados.
 */
.account-view.humanity-product-v1[data-view="home"] {
  background: none;
  color: inherit;
  font-family: inherit;
}

/**
 * Etapa 4B — Home premium: "Tu Humanidad", Personas, Historias recientes,
 * teaser Mundo/Legados. Namespaced bajo .humanity-product-v1 como el resto
 * del archivo. .beta20-home-premium-extra es el único puente hacia el grid
 * heredado de .beta20-home (grid-template-areas "hero rail" "activity rail"
 * "memory memory" "discover discover" en sus breakpoints anchos): al pedir
 * grid-column:1/-1 se auto-coloca como una fila más, sin tocar ni duplicar
 * ninguna de esas áreas ya existentes.
 */
.humanity-product-v1.beta20-home-premium-extra {
  grid-column: 1 / -1;
  display: grid;
  gap: 40px;
  margin-top: 8px;
}

.humanity-product-v1 .humanity-product-section-title {
  margin: 8px 0 0;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.1;
}

/* Tres puertas: Mis Raíces / Historias / Constelación */
.humanity-product-v1 .humanity-product-surface-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.humanity-product-v1 .humanity-product-mini-surface {
  /* Baseline única para las tres puertas: mismo fondo, radius, altura y
     padding — la diferencia entre disponible/próximamente se marca con
     badge + opacity, nunca cambiando toda la tarjeta a otro color. */
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
  padding: 30px;
  background: var(--hp-panel);
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius-lg);
  transition: transform var(--hp-transition), border-color var(--hp-transition), opacity var(--hp-transition);
}

.humanity-product-v1 .humanity-product-mini-surface:hover {
  transform: translateY(-3px);
  border-color: rgba(215, 182, 108, 0.4);
}

.humanity-product-v1 .humanity-product-mini-surface--soon {
  opacity: 0.86;
}

.humanity-product-v1 .humanity-product-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.humanity-product-v1 .humanity-product-mini-kicker {
  color: var(--hp-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-mini-stat {
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 500;
}

.humanity-product-v1 .humanity-product-mini-copy {
  flex: 1;
  margin: 0;
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.humanity-product-v1 .humanity-product-mini-surface .humanity-product-action {
  align-self: flex-start;
  min-height: 38px;
  padding: 0 16px;
  font-size: 12px;
}

/* Personas: fila de chips, gateados por privacidad en el runtime */
.humanity-product-v1 .humanity-product-people-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
  min-height: 54px;
}

.humanity-product-v1 .humanity-product-person-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--hp-line-soft);
  border-radius: 999px;
  background: rgba(215, 182, 108, 0.035);
  transition: border-color var(--hp-transition), background-color var(--hp-transition);
}

.humanity-product-v1 .humanity-product-person-chip:hover {
  border-color: var(--hp-line);
  background: rgba(215, 182, 108, 0.07);
}

.humanity-product-v1 .humanity-product-person-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(215, 182, 108, 0.14);
  color: var(--hp-gold-soft);
  font-weight: 800;
  font-size: 13px;
}

.humanity-product-v1 .humanity-product-person-name {
  min-height: 1em;
  color: var(--hp-ivory);
  font-size: 13px;
  font-weight: 600;
}

/* Historias recientes: 3 tarjetas editoriales, no un feed infinito */
.humanity-product-v1 .humanity-product-stories-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.humanity-product-v1 .humanity-product-story-card {
  padding: 20px;
  border: 1px solid var(--hp-line-soft);
  border-radius: var(--hp-radius-md);
  background: rgba(215, 182, 108, 0.025);
  cursor: pointer;
  transition: transform var(--hp-transition), border-color var(--hp-transition);
}

.humanity-product-v1 .humanity-product-story-card:not(.is-loading):hover,
.humanity-product-v1 .humanity-product-story-card:not(.is-loading):focus-visible {
  transform: translateY(-3px);
  border-color: var(--hp-line);
  outline: none;
}

.humanity-product-v1 .humanity-product-story-card small {
  color: var(--hp-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-story-card h3 {
  margin: 8px 0 6px;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
}

.humanity-product-v1 .humanity-product-story-card p {
  margin: 0;
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.6;
}

.humanity-product-v1 .humanity-product-story-card.is-loading {
  min-height: 132px;
  cursor: default;
  background: rgba(215, 182, 108, 0.04);
  animation: humanity-product-skeleton-pulse-v1 1.6s ease-in-out infinite;
}

@keyframes humanity-product-skeleton-pulse-v1 {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.6; }
}

/* Teaser Mundo/Legados: una sola franja ancha, visual únicamente, sin CTA funcional */
.humanity-product-v1 .humanity-product-teaser-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 32px;
}

.humanity-product-v1 .humanity-product-teaser-band-copy {
  min-width: 0;
}

.humanity-product-v1 .humanity-product-teaser-tags {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.humanity-product-v1 .humanity-product-teaser-tags span {
  padding: 4px 12px;
  border: 1px solid var(--hp-line-soft);
  border-radius: 999px;
  color: var(--hp-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-teaser-badge {
  flex: 0 0 auto;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--hp-line);
  border-radius: 999px;
  color: var(--hp-gold-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Personas: intro editorial + placeholder de carga en el avatar */
.humanity-product-v1 .humanity-product-section-intro {
  margin: 6px 0 0;
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.55;
}

.humanity-product-v1 .humanity-product-person-avatar:empty {
  background: rgba(215, 182, 108, 0.08);
  animation: humanity-product-skeleton-pulse-v1 1.6s ease-in-out infinite;
}

/* Historias: línea de autor, solo aparece cuando el runtime la resuelve */
.humanity-product-v1 .humanity-product-story-author {
  display: block;
  margin-top: 10px;
  color: var(--hp-gold-soft);
  font-size: 11px;
  font-weight: 600;
}

/* Tres puertas: identidad visual distinta por superficie (decorativo, sin datos) */
.humanity-product-v1 .humanity-product-mini-ornament {
  align-self: flex-end;
  width: 56px;
  height: 40px;
  opacity: 0.85;
}

.humanity-product-v1 .humanity-product-mini-ornament--roots {
  position: relative;
}

.humanity-product-v1 .humanity-product-mini-ornament--roots span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hp-gold-soft);
  box-shadow: 0 0 6px rgba(215, 182, 108, 0.4);
}

.humanity-product-v1 .humanity-product-mini-ornament--roots span:nth-child(1) { top: 0; left: 25px; }
.humanity-product-v1 .humanity-product-mini-ornament--roots span:nth-child(2) { top: 26px; left: 8px; }
.humanity-product-v1 .humanity-product-mini-ornament--roots span:nth-child(3) { top: 26px; left: 42px; }

.humanity-product-v1 .humanity-product-mini-ornament--roots::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 28px;
  width: 1px;
  height: 12px;
  background: var(--hp-line);
}

.humanity-product-v1 .humanity-product-mini-ornament--roots::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 11px;
  width: 34px;
  height: 9px;
  border: 1px solid var(--hp-line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.humanity-product-v1 .humanity-product-mini-ornament--stories {
  position: relative;
}

.humanity-product-v1 .humanity-product-mini-ornament--stories::before,
.humanity-product-v1 .humanity-product-mini-ornament--stories::after {
  content: "";
  position: absolute;
  right: 4px;
  width: 34px;
  height: 24px;
  border: 1px solid var(--hp-line-soft);
  border-radius: 3px;
  background: rgba(215, 182, 108, 0.03);
}

.humanity-product-v1 .humanity-product-mini-ornament--stories::before { top: 8px; right: 0; transform: rotate(4deg); }
.humanity-product-v1 .humanity-product-mini-ornament--stories::after { top: 4px; right: 8px; transform: rotate(-3deg); border-color: var(--hp-line); }

.humanity-product-v1 .humanity-product-mini-ornament--constellation {
  fill: none;
  stroke: var(--hp-line);
  stroke-width: 1;
}

.humanity-product-v1 .humanity-product-mini-ornament--constellation circle {
  fill: var(--hp-gold-soft);
  stroke: none;
}

/* Hero: escena única — orbital detrás del copy, no dos paneles separados */
.beta20-home-cover.humanity-product-v1 {
  overflow: hidden;
}

.beta20-home-cover.humanity-product-v1 .humanity-product-orbit-visual {
  position: absolute;
  top: -10%;
  right: -8%;
  width: min(88%, 340px);
  margin: 0;
  opacity: 0.92;
  pointer-events: none;
  transition: transform 260ms ease;
}

.beta20-home-cover.humanity-product-v1 > span,
.beta20-home-cover.humanity-product-v1 > strong,
.beta20-home-cover.humanity-product-v1 > small {
  position: relative;
  z-index: 1;
}

.beta20-home-cover.humanity-product-v1 small {
  display: block;
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--hp-muted);
  opacity: 0.9;
}

@media (max-width: 680px) {
  .beta20-home-cover.humanity-product-v1 .humanity-product-orbit-visual {
    position: relative;
    top: auto;
    right: auto;
    width: min(60%, 200px);
    margin: 0 auto 12px;
  }
}

/* Hero: necesita su propia .humanity-product-v1 para poder encapsular
   :has() sobre sí mismo y sus descendientes (.beta20-home-actions,
   .beta20-home-hero-copy) — su fondo/tipografía ya explícitos ganan por
   orden de cascada, igual que .beta20-home-cover más arriba. */
.beta20-home-hero.humanity-product-v1 {
  position: relative;
}

/* Orbital: respuesta sutil al hover/focus del CTA principal, sin JS */
.humanity-product-v1 .humanity-product-light {
  transition: filter 260ms ease;
}

.beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:focus-visible) .humanity-product-orbit-visual {
  transform: scale(1.035);
}

.beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:focus-visible) .humanity-product-light {
  filter: brightness(1.4);
}

@media (hover: hover) {
  .beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:hover) .humanity-product-orbit-visual {
    transform: scale(1.035);
  }
  .beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:hover) .humanity-product-light {
    filter: brightness(1.4);
  }
}

/* CTA del hero con respuesta visual sutil (no toca .account-action global) */
.beta20-home-hero.humanity-product-v1 .beta20-home-actions .account-action {
  transition: transform 160ms ease, filter 160ms ease;
}

.beta20-home-hero.humanity-product-v1 .beta20-home-actions .account-action:hover {
  transform: translateY(-2px);
}

/* Tablet: evitar que la columna orbital del hero quede demasiado angosta */
@media (max-width: 1100px) {
  .account-view.humanity-product-v1[data-view="home"] .beta20-home-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .humanity-product-v1 .humanity-product-surface-grid,
  .humanity-product-v1 .humanity-product-stories-row {
    grid-template-columns: 1fr;
  }
  .humanity-product-v1 .humanity-product-teaser-band {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .humanity-product-v1 .humanity-product-mini-surface,
  .humanity-product-v1 .humanity-product-person-chip,
  .humanity-product-v1 .humanity-product-story-card,
  .humanity-product-v1 .humanity-product-orbit-visual,
  .humanity-product-v1 .humanity-product-light,
  .beta20-home-hero.humanity-product-v1 .beta20-home-actions .account-action {
    transition: none;
  }
  .humanity-product-v1 .humanity-product-mini-surface:hover,
  .beta20-home-hero.humanity-product-v1 .beta20-home-actions .account-action:hover,
  .beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:hover) .humanity-product-orbit-visual,
  .beta20-home-hero.humanity-product-v1:has(.beta20-home-actions [data-account-view="constellation"]:focus-visible) .humanity-product-orbit-visual {
    transform: none;
  }
  .humanity-product-v1 .humanity-product-story-card.is-loading,
  .humanity-product-v1 .humanity-product-person-avatar:empty {
    animation: none;
    opacity: 0.5;
  }
}

/**
 * Visual Convergence V1 — additional primitives (Etapa 1: solo CSS).
 * Nada de esto lo consume todavía ningún HTML/JS existente. Se agregan aquí
 * para que humanity-product-surfaces-v1.css siga siendo la única autoridad
 * visual productiva — ninguna superficie nueva trae su propio archivo CSS.
 * Fuente: Design System V1 extraído de los 7 prototipos del lab (profile-
 * human-v1, stories-v1, world-lite-v1, history-humanity-v2, legacy-profile-v1).
 */

/* Chip genérico (tag/lugar/persona-en-historia sin avatar). Distinto de
   .humanity-product-person-chip, que siempre lleva avatar + nombre. */
.humanity-product-v1 .humanity-product-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid var(--hp-line-soft);
  border-radius: 999px;
  color: var(--hp-text);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.humanity-product-v1 .humanity-product-chip[data-state="active"] {
  border-color: rgba(215, 182, 108, 0.55);
  color: var(--hp-gold-soft);
}

/* Retrato grande (Mi Perfil). .humanity-product-person-avatar (34px) sigue
   siendo el tamaño de chip; este es el slot circular protagonista. */
.humanity-product-v1 .humanity-product-portrait {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  width: 100%;
  border: 1px solid rgba(215, 182, 108, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 182, 108, 0.13), rgba(8, 18, 30, 0.92) 68%);
  color: var(--hp-gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 4vw, 46px);
  overflow: hidden;
}

/* Identidad: línea de ID pequeña + nombre protagonista serif. */
.humanity-product-v1 .humanity-product-identity-id {
  color: var(--hp-gold);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-identity-name {
  margin: 7px 0 0;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.05;
}

/* Grid de 3 columnas (retrato / identidad / estadísticas) para heroes tipo
   Mi Perfil. Nada la usa todavía. */
.humanity-product-v1 .humanity-product-identity-grid {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) minmax(240px, 320px);
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .humanity-product-v1 .humanity-product-identity-grid {
    grid-template-columns: 1fr;
  }
}

/* Lista de estadísticas en fila (label/value con divisor), distinta del
   grid en cajas .humanity-product-metric usado en Constelación/Home. */
.humanity-product-v1 .humanity-product-stat-list {
  display: grid;
}

.humanity-product-v1 .humanity-product-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--hp-line-soft);
}

.humanity-product-v1 .humanity-product-stat-row:last-child {
  border-bottom: 0;
}

.humanity-product-v1 .humanity-product-stat-row .humanity-product-stat-label {
  color: var(--hp-muted);
  font-size: 13px;
}

.humanity-product-v1 .humanity-product-stat-row .humanity-product-stat-value {
  color: var(--hp-gold-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
}

/* Historias como lista editorial (Design System V1 / stories-v1), distinta
   del grid en tarjetas .humanity-product-story-card usado en Home. */
.humanity-product-v1 .humanity-product-story-list {
  display: grid;
}

.humanity-product-v1 .humanity-product-story-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--hp-line-soft);
}

.humanity-product-v1 .humanity-product-story-row:last-child {
  border-bottom: 0;
}

.humanity-product-v1 .humanity-product-story-row .humanity-product-eyebrow {
  margin-bottom: 6px;
}

.humanity-product-v1 .humanity-product-story-row h2 {
  margin: 0 0 8px;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  line-height: 1.2;
}

.humanity-product-v1 .humanity-product-story-row p {
  margin: 0;
  color: var(--hp-text);
  font-size: 15px;
  line-height: 1.65;
}

.humanity-product-v1 .humanity-product-story-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Toolbar de sección genérica (título a la izquierda, acciones a la
   derecha). Candidato para el encabezado de Mis Raíces sin tocar F3. */
.humanity-product-v1 .humanity-product-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.humanity-product-v1 .humanity-product-section-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Hero de teaser "Próximamente" (Mundo / Historia / Legados). Compone los
   primitives ya existentes (hero, title, subtitle, badge, action, note) más
   un marco visual conceptual genérico — nunca datos, nunca mapas reales. */
.humanity-product-v1 .humanity-product-teaser-hero {
  display: grid;
  place-items: center;
  gap: 18px;
  min-height: min(560px, 70vh);
  padding: clamp(40px, 8vw, 90px) 20px;
  text-align: center;
}

.humanity-product-v1 .humanity-product-teaser-hero .humanity-product-title,
.humanity-product-v1 .humanity-product-teaser-hero .humanity-product-subtitle {
  margin-left: auto;
  margin-right: auto;
}

.humanity-product-v1 .humanity-product-teaser-visual {
  position: relative;
  width: min(60vw, 320px);
  aspect-ratio: 1;
  margin: 8px auto 0;
  border: 1px solid rgba(215, 182, 108, 0.4);
  border-radius: 50%;
  box-shadow: 0 0 70px rgba(212, 170, 86, 0.14), inset 0 0 55px rgba(212, 170, 86, 0.08);
  opacity: 0.85;
}

@media (max-width: 680px) {
  .humanity-product-v1 .humanity-product-teaser-hero {
    padding: 40px 16px;
  }
  .humanity-product-v1 .humanity-product-teaser-visual {
    width: min(72vw, 240px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .humanity-product-v1 .humanity-product-chip,
  .humanity-product-v1 .humanity-product-story-row,
  .humanity-product-v1 .humanity-product-teaser-visual,
  .humanity-product-v1 .humanity-product-future-card {
    transition: none;
  }
}

/* Superficies futuras: Mundo / Historia / Legados (Próximamente) */
.humanity-product-v1 .humanity-product-future-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.humanity-product-v1 .humanity-product-future-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.humanity-product-v1 .humanity-product-future-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--hp-line-soft);
  border-radius: var(--hp-radius-lg);
  background: linear-gradient(180deg, rgba(14, 25, 40, 0.72), rgba(7, 14, 24, 0.92));
  box-shadow: var(--hp-shadow);
  transition: border-color var(--hp-transition);
}

.humanity-product-v1 .humanity-product-future-card:hover {
  border-color: var(--hp-line);
}

.humanity-product-v1 .humanity-product-future-visual {
  position: relative;
  width: 100%;
  height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(215, 182, 108, 0.06), transparent 70%),
              linear-gradient(180deg, #03070e 0%, #08111d 100%);
  border-bottom: 1px solid var(--hp-line-soft);
}

.humanity-product-v1 .humanity-product-future-visual svg {
  width: 100%;
  height: 100%;
  max-width: 320px;
  display: block;
}

.humanity-product-v1 .humanity-product-future-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 22px 26px;
}

.humanity-product-v1 .humanity-product-future-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.humanity-product-v1 .humanity-product-future-meta .humanity-product-eyebrow {
  margin: 0;
  color: var(--hp-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.humanity-product-v1 .humanity-product-future-title {
  margin: 0 0 10px;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 1.8vw, 22px);
  font-weight: 500;
  line-height: 1.25;
}

.humanity-product-v1 .humanity-product-future-lead {
  margin: 0;
  color: var(--hp-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* CTA "Vista previa": Mundo ya vive en este mismo sitio (vista previa
   real, con su propio aviso "Próximamente" adentro) — el botón entra
   habilitado, con el mismo acento dorado que el resto de los CTA. */
.humanity-product-v1 .humanity-product-future-cta {
  align-self: flex-start;
  margin-top: 16px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(215, 182, 108, 0.4);
  border-radius: 12px;
  background: transparent;
  color: var(--hp-gold-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color var(--hp-transition), background var(--hp-transition);
}
.humanity-product-v1 .humanity-product-future-cta:hover {
  border-color: rgba(215, 182, 108, 0.7);
  background: rgba(215, 182, 108, 0.08);
}

@media (max-width: 1024px) {
  .humanity-product-v1 .humanity-product-future-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 680px) {
  .humanity-product-v1 .humanity-product-future-visual {
    height: 150px;
  }
  .humanity-product-v1 .humanity-product-future-content {
    padding: 18px 16px 20px;
  }
  .humanity-product-v1 .humanity-product-future-title {
    font-size: 18px;
  }
  .humanity-product-v1 .humanity-product-future-lead {
    font-size: 13px;
  }
}


/**
 * Visual Convergence V1 — Mi Perfil productivo.
 * profile-human-v1 aporta composición y ritmo; Beta20 conserva todos los
 * datos, IDs, eventos, privacidad y mutaciones del perfil real.
 */
.profile-v50.humanity-product-v1 {
  max-width: 1380px;
  padding: 18px 0 44px;
  background: transparent;
}

.profile-v50.humanity-product-v1 .profile-v50-topbar {
  max-width: 1240px;
  margin: 0 auto 28px !important;
}

.profile-v50.humanity-product-v1 .profile-v50-hero {
  max-width: 1240px;
  min-height: 0 !important;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--hp-radius-xl) !important;
  background: linear-gradient(145deg, rgba(10, 22, 36, 0.97), rgba(5, 12, 23, 0.98)) !important;
}

.profile-v50.humanity-product-v1 .profile-v50-cover {
  background:
    radial-gradient(circle at 13% 16%, rgba(215, 182, 108, 0.13), transparent 27%),
    radial-gradient(circle at 77% 12%, rgba(74, 111, 151, 0.18), transparent 30%) !important;
  filter: none;
}

.profile-v50.humanity-product-v1 .profile-v50-cover::after {
  background: linear-gradient(180deg, rgba(5, 12, 23, 0.08), rgba(5, 12, 23, 0.64));
}

.profile-v50.humanity-product-v1 .profile-v50-hero-content {
  position: relative;
  z-index: 1;
  /* Antes: avatar hasta 230px + stats hasta 310px se comían casi todo el
     ancho real de laptop (1280-1512px), dejando la columna de identidad
     (nombre/bio/chips/botones) en ~260px — los 3 botones de acción no
     entraban ni de a 2 y se apilaban verticalmente, estirando esa columna
     mucho más que el panel de stats de al lado y dejando un vacío enorme. */
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr) minmax(210px, 260px) !important;
  gap: clamp(26px, 3vw, 46px) !important;
  /* Antes "center": con un nombre de 3 líneas, la columna de identidad
     queda mucho más alta que el avatar y que el panel de stats — ambos
     quedaban flotando a mitad de altura con aire de sobra arriba y abajo.
     Alineando arriba, cada columna empieza en el mismo punto y el espacio
     sobrante queda abajo, donde se nota mucho menos. */
  align-items: start;
  min-height: 0 !important;
  /* Antes clamp(34px,4.5vw,68px): en laptop (1280-1568px) eso es 57-68px
     de padding en las 4 caras. Sumado a los márgenes internos de la
     columna de identidad, el hero terminaba midiendo ~534px — más que el
     viewport visible (746-786px) sin scrollear. Lo que había DEBAJO del
     hero (Información personal, Lugares vinculados, Mi identidad
     familiar, Historias destacadas — ya construido y con datos reales)
     quedaba invisible en la primera pantalla, sintiéndose como una
     página vacía aunque no lo era. */
  padding: clamp(22px, 2.6vw, 36px) !important;
}

.profile-v50.humanity-product-v1 .profile-v50-portrait-column {
  display: grid;
  justify-items: center;
  gap: 20px;
  min-width: 0;
}

.profile-v50.humanity-product-v1 .profile-v50-avatar-wrap,
.profile-v50.humanity-product-v1 .profile-v50-avatar {
  /* Antes 220px: al lado de una columna de identidad de ~340px, el
     avatar ocupaba una proporción demasiado grande del hero y forzaba el
     nombre a envolver más apretado de lo necesario. 170px equilibra
     mejor avatar vs. bloque de texto sin perder presencia. */
  width: min(100%, 170px) !important;
  height: auto !important;
  aspect-ratio: 1;
}

.profile-v50.humanity-product-v1 .profile-v50-avatar {
  border-width: 2px !important;
  border-color: rgba(239, 199, 111, 0.78) !important;
  box-shadow: 0 0 0 10px rgba(215, 182, 108, 0.055), 0 28px 70px rgba(0, 0, 0, 0.38) !important;
}

.profile-v50.humanity-product-v1 .profile-v50-camera {
  right: 5px;
  bottom: 5px;
  width: 46px;
  height: 46px;
  background: #0c1724;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
}

.profile-v50.humanity-product-v1 .profile-v50-handle {
  max-width: 100%;
  overflow: hidden;
  color: var(--hp-gold-soft);
  text-overflow: ellipsis;
}

.profile-v50.humanity-product-v1 .profile-v50-identity {
  align-self: start;
  min-width: 0;
}

.profile-v50.humanity-product-v1 .profile-v50-name-row {
  align-items: center;
  margin-top: 4px;
}

.profile-v50.humanity-product-v1 .profile-v50-name-row .humanity-product-identity-name {
  margin: 0;
  /* Antes clamp(42px,4.6vw,70px): con nombre y apellidos reales (2-3
     palabras) envolvía a 3 líneas y estiraba toda la fila. Este tamaño
     entra en 1-2 líneas para la gran mayoría de nombres, sin perder la
     escala editorial del resto del sitio. */
  font-size: clamp(34px, 3.4vw, 52px) !important;
  letter-spacing: -0.03em;
}

.profile-v50.humanity-product-v1 .profile-v50-identity > p {
  max-width: 660px;
  margin: 12px 0 0;
  color: var(--hp-text);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.75;
}

.profile-v50.humanity-product-v1 .profile-v50-meta {
  gap: 9px;
  margin-top: 14px;
}

.profile-v50.humanity-product-v1 .profile-v50-meta .humanity-product-chip {
  gap: 7px;
  min-width: 0;
  white-space: normal;
}

.profile-v50.humanity-product-v1 .profile-v50-meta svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.profile-v50.humanity-product-v1 .profile-v50-actions {
  display: flex !important;
  grid-column: auto !important;
  gap: 10px !important;
  min-width: 0;
  margin-top: 18px;
}

.profile-v50.humanity-product-v1 .profile-v50-actions .profile-v50-btn {
  display: inline-flex !important;
  min-height: 46px;
  border-radius: 12px;
  backdrop-filter: none;
}

.profile-v50.humanity-product-v1 .profile-v50-actions .profile-v50-btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--hp-muted);
}

.profile-v50.humanity-product-v1 .profile-v50-stats {
  display: block !important;
  /* Antes "stretch": el panel se estiraba para igualar la columna de
     identidad (mucho más alta) y las 4 filas de stats quedaban con aire
     de sobra abajo. Ahora el panel toma solo la altura de su contenido
     real. */
  align-self: start;
  min-width: 0;
  margin: 0 !important;
  padding: 13px 20px;
  overflow: visible;
  border-radius: var(--hp-radius-md) !important;
  background: rgba(7, 16, 28, 0.78) !important;
}

.profile-v50.humanity-product-v1 .humanity-product-stat-row {
  gap: 20px;
  min-height: 60px;
}

.profile-v50.humanity-product-v1 .humanity-product-stat-label {
  min-width: 0;
  line-height: 1.35;
}

.profile-v50.humanity-product-v1 .humanity-product-stat-label small {
  display: block;
  max-width: 170px;
  margin-top: 4px;
  color: #6f8296;
  font-size: 10px;
}

.profile-v50.humanity-product-v1 .humanity-product-stat-value {
  flex: 0 0 auto;
  font-size: 25px;
}

.profile-v50.humanity-product-v1 .profile-v50-place {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 280px);
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  max-width: 1240px;
  margin: 24px auto 0;
  padding: clamp(30px, 4vw, 54px);
  overflow: hidden;
  border-radius: var(--hp-radius-lg);
  background:
    radial-gradient(circle at 8% 0, rgba(215, 182, 108, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(9, 21, 36, 0.96), rgba(5, 13, 25, 0.98));
}

.profile-v50.humanity-product-v1 .profile-v50-place-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-v50.humanity-product-v1 .profile-v50-place-heading .humanity-product-eyebrow {
  margin: 0;
}

.profile-v50.humanity-product-v1 .profile-v50-place h2 {
  max-width: 720px;
  margin: 12px 0 14px;
  color: var(--hp-ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.5vw, 50px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.profile-v50.humanity-product-v1 .profile-v50-place p {
  max-width: 760px;
  margin: 0;
  color: var(--hp-text);
  font-size: 15px;
  line-height: 1.7;
}

.profile-v50.humanity-product-v1 .profile-v50-place-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.profile-v50.humanity-product-v1 .profile-v50-place-visual {
  width: min(100%, 260px);
  margin: 0 auto;
  background:
    radial-gradient(circle at 50% 50%, rgba(239, 199, 111, 0.74) 0 2px, transparent 3px),
    radial-gradient(circle at 34% 31%, rgba(139, 184, 201, 0.7) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 63%, rgba(215, 182, 108, 0.54) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(215, 182, 108, 0.08), transparent 64%);
}

.profile-v50.humanity-product-v1 .profile-v50-grid,
.profile-v50.humanity-product-v1 .profile-v50-connected {
  max-width: 1240px;
  margin-right: auto;
  margin-left: auto;
}

.profile-v50.humanity-product-v1 .profile-v50-grid {
  /* Antes: un solo grid de 2 columnas x 3 filas con las 4 tarjetas.
     align-items:start arregló que "Información personal" se estirara a
     la altura de "Lugares vinculados", pero el problema seguía: la FILA
     seguía midiendo el alto del más grande (301px), así que quedaba un
     hueco vacío debajo de la tarjeta corta antes de que empezara la fila
     siguiente. Y "Mi identidad familiar" ocupaba una sola columna de esa
     fila, dejando la otra columna completamente en blanco (416x313px sin
     nada). Con esto convertido en una pila vertical de secciones
     independientes (.profile-v50-row para el par corto/largo, y
     familia/historias como bloques propios de ancho completo), cada
     sección mide solo lo que necesita y la siguiente empieza inmediato
     después — sin huecos entre filas ni columnas vacías. */
  display: flex !important;
  flex-direction: column;
  gap: 20px !important;
  margin-top: 24px;
}

.profile-v50.humanity-product-v1 .profile-v50-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 20px;
  align-items: start;
}

.profile-v50.humanity-product-v1 .profile-v50-card {
  padding: clamp(22px, 2.4vw, 32px);
  border-color: var(--hp-line-soft);
  border-radius: var(--hp-radius-md) !important;
  background: linear-gradient(145deg, rgba(10, 21, 35, 0.94), rgba(5, 13, 24, 0.96)) !important;
}

.profile-v50.humanity-product-v1 .profile-v50-connected {
  margin-top: 20px;
}

@media (max-width: 1180px) {
  .profile-v50.humanity-product-v1 .profile-v50-hero-content {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr) !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-stats {
    grid-column: 1 / -1;
  }
  .profile-v50.humanity-product-v1 .profile-v50-stats .humanity-product-stat-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 18px;
  }
  .profile-v50.humanity-product-v1 .humanity-product-stat-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    border-bottom: 0;
  }
}

@media (max-width: 900px) {
  .profile-v50.humanity-product-v1 .profile-v50-hero-content {
    grid-template-columns: 1fr !important;
    padding: 36px 28px !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-portrait-column {
    justify-items: start;
  }
  .profile-v50.humanity-product-v1 .profile-v50-avatar-wrap,
  .profile-v50.humanity-product-v1 .profile-v50-avatar {
    width: 180px !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-stats {
    grid-column: auto;
  }
  .profile-v50.humanity-product-v1 .profile-v50-place {
    grid-template-columns: 1fr;
  }
  .profile-v50.humanity-product-v1 .profile-v50-place-visual {
    display: none;
  }
  .profile-v50.humanity-product-v1 .profile-v50-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 680px) {
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-app {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-main {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-sidebar {
    position: fixed !important;
    z-index: 10032 !important;
    top: auto !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    left: 12px !important;
    display: block !important;
    width: auto !important;
    height: 74px !important;
    min-height: 74px !important;
    padding: 7px 8px !important;
    border: 1px solid rgba(215, 188, 121, 0.22) !important;
    border-radius: 24px !important;
    background: rgba(10, 11, 8, 0.96) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55) !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-sidebar::before,
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav::before,
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .profile-mini {
    display: none !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(215, 188, 121, 0.26) transparent !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav::-webkit-scrollbar {
    display: block !important;
    width: 3px !important;
    height: 3px !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav::-webkit-scrollbar-thumb {
    background: rgba(215, 188, 121, 0.26) !important;
    border-radius: 999px !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    gap: 7px !important;
    white-space: nowrap !important;
  }
  html body .account-modal.open:not(.auth-only):has(.account-view[data-view="profile"].active) .social-nav button span:last-child {
    display: inline !important;
  }
  .profile-v50.humanity-product-v1 {
    padding-top: 8px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-topbar {
    align-items: flex-start !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-hero-content {
    display: grid;
    padding: 28px 20px !important;
    text-align: left;
  }
  .profile-v50.humanity-product-v1 .profile-v50-avatar-wrap,
  .profile-v50.humanity-product-v1 .profile-v50-avatar {
    width: 142px !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-camera {
    width: 40px;
    height: 40px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-name-row {
    justify-content: flex-start;
    margin-top: 8px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-name-row .humanity-product-identity-name {
    font-size: clamp(38px, 12vw, 52px) !important;
  }
  .profile-v50.humanity-product-v1 .profile-v50-identity > p {
    display: block;
    margin-top: 17px;
    overflow: visible;
    font-size: 15px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }
  .profile-v50.humanity-product-v1 .profile-v50-actions .profile-v50-btn {
    width: 100%;
    padding: 0 10px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-stats {
    padding: 10px 16px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-stats .humanity-product-stat-list {
    grid-template-columns: 1fr 1fr;
  }
  .profile-v50.humanity-product-v1 .humanity-product-stat-row {
    min-height: 76px;
    padding: 12px 6px;
    border-bottom: 1px solid var(--hp-line-soft);
  }
  .profile-v50.humanity-product-v1 .profile-v50-place {
    padding: 28px 20px;
  }
  .profile-v50.humanity-product-v1 .profile-v50-place h2 {
    font-size: 32px;
  }
}

/**
 * Visual Convergence V1 — Historias productivo (stories-v1).
 * stories-v1 aporta tono editorial, ritmo de relatos, tipografía serif cálida
 * y paleta nocturna refinada; Beta20 conserva todos los datos, IDs,
 * selectores, hardening de privacidad de eb1aa4e y contrato HumanityMemoriesV1.
 */

/* 1. Contenedor de la vista */
.account-view.beta20-memories.humanity-product-v1 {
  max-width: 1240px !important;
  margin: 0 auto;
  padding: 24px clamp(16px, 3vw, 32px) 64px !important;
  background: transparent !important;
}

/* 2. Encabezado editorial */
.beta20-memories.humanity-product-v1 .beta20-page-head {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: clamp(20px, 3vw, 40px) !important;
  margin: 0 0 28px !important;
  padding: 0 0 24px !important;
  border-bottom: 1px solid var(--hp-line-soft) !important;
}

.beta20-memories.humanity-product-v1 .beta20-page-head .account-kicker {
  display: inline-block !important;
  margin-bottom: 6px !important;
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}

.beta20-memories.humanity-product-v1 .beta20-page-head h2 {
  margin: 4px 0 10px !important;
  color: var(--hp-ivory) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: clamp(30px, 3.6vw, 44px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em !important;
}

.beta20-memories.humanity-product-v1 .beta20-page-head p {
  max-width: 620px !important;
  margin: 0 !important;
  color: var(--hp-muted) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

/* 3. CTA principal Contar mi historia */
.beta20-memories.humanity-product-v1 #beta20MemoryCreateTop {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  padding: 12px 22px !important;
  border: 1px solid rgba(179, 138, 69, 0.72) !important;
  border-radius: var(--hp-radius-sm) !important;
  background: linear-gradient(180deg, #c99e4f, #b38a45) !important;
  color: #07101b !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 8px 24px rgba(179, 138, 69, 0.25) !important;
  cursor: pointer !important;
  transition: transform var(--hp-transition), box-shadow var(--hp-transition), filter var(--hp-transition) !important;
  white-space: nowrap !important;
}

.beta20-memories.humanity-product-v1 #beta20MemoryCreateTop:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.06) !important;
  box-shadow: 0 12px 30px rgba(179, 138, 69, 0.35) !important;
}

.beta20-memories.humanity-product-v1 #beta20MemoryCreateTop:active {
  transform: translateY(0) !important;
  filter: brightness(0.96) !important;
}

.beta20-memories.humanity-product-v1 #beta20MemoryCreateTop:focus-visible {
  outline: 2px solid var(--hp-focus) !important;
  outline-offset: 3px !important;
}

/* 4. Toolbar / Estado honesto de filtros */
.beta20-memories.humanity-product-v1 .beta20-memory-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin: 0 0 24px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.beta20-memories.humanity-product-v1 .humanity-product-stories-toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.beta20-memories.humanity-product-v1 .humanity-product-chip.is-disabled {
  display: inline-flex !important;
  align-items: center !important;
  padding: 6px 14px !important;
  border: 1px dashed rgba(215, 182, 108, 0.24) !important;
  border-radius: 999px !important;
  background: rgba(8, 17, 30, 0.5) !important;
  color: var(--hp-muted) !important;
  font-size: 12px !important;
  letter-spacing: 0.02em !important;
  user-select: none !important;
  opacity: 0.88 !important;
}

/* 5. Grilla y Relatos (#beta20MemoryGrid) */
.beta20-memories.humanity-product-v1 .beta20-memory-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* Neutralizar asimetría legacy de nth-child y fondos verdosos */
.beta20-memories.humanity-product-v1 .beta20-memory-card:nth-child(n) {
  position: relative !important;
  grid-column: auto !important;
  min-height: 240px !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-lg) !important;
  background: linear-gradient(180deg, rgba(11, 23, 37, 0.94), rgba(7, 16, 27, 0.98)) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  text-align: left !important;
  cursor: pointer !important;
  overflow: hidden !important;
  transition: transform var(--hp-transition), border-color var(--hp-transition), box-shadow var(--hp-transition) !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card:hover {
  transform: translateY(-2px) !important;
  border-color: var(--hp-line) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38) !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card:focus-visible {
  outline: 2px solid var(--hp-focus) !important;
  outline-offset: 3px !important;
}

/* Jerarquía interna de la Card */
.beta20-memories.humanity-product-v1 .beta20-memory-card small {
  display: block !important;
  margin-bottom: 8px !important;
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card h3 {
  margin: 0 0 10px !important;
  color: var(--hp-ivory) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: 22px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  word-break: break-word !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card p {
  flex: 1 1 auto !important;
  margin: 0 !important;
  color: var(--hp-text) !important;
  font-size: 14.5px !important;
  line-height: 1.65 !important;
  word-break: break-word !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* Chips de personas en la Card */
.beta20-memories.humanity-product-v1 .beta20-memory-card .humanity-memory-card-people {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  margin: 14px 0 12px !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card .humanity-memory-card-people span {
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 10px !important;
  border: 1px solid rgba(215, 182, 108, 0.22) !important;
  border-radius: 999px !important;
  background: rgba(8, 17, 30, 0.6) !important;
  color: #d7c7ab !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
}

/* Footer de la Card */
.beta20-memories.humanity-product-v1 .beta20-memory-card .hmemory-card-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin-top: auto !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--hp-line-soft) !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card .hmemory-author {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--hp-muted) !important;
  font-size: 12px !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card .hmemory-author i {
  display: grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 24px !important;
  border: 1px solid rgba(215, 182, 108, 0.24) !important;
  border-radius: 50% !important;
  background: rgba(215, 182, 108, 0.12) !important;
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card .hmemory-author span {
  color: var(--hp-muted) !important;
  font-weight: 500 !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card .hmemory-open {
  color: var(--hp-gold-strong) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
}

/* 6. Empty State */
.beta20-memories.humanity-product-v1 .beta20-memory-card.is-empty {
  grid-column: 1 / -1 !important;
  min-height: 220px !important;
  padding: 48px 32px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  border: 1px dashed rgba(215, 182, 108, 0.28) !important;
  border-radius: var(--hp-radius-xl) !important;
  background: linear-gradient(180deg, rgba(11, 23, 37, 0.7), rgba(7, 16, 27, 0.85)) !important;
  box-shadow: none !important;
  cursor: default !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card.is-empty:hover {
  transform: none !important;
  border-color: rgba(215, 182, 108, 0.28) !important;
  box-shadow: none !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card.is-empty small {
  margin-bottom: 8px !important;
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card.is-empty h3 {
  margin: 0 0 10px !important;
  color: var(--hp-ivory) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: clamp(22px, 2.6vw, 30px) !important;
  font-weight: 500 !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-card.is-empty p {
  max-width: 520px !important;
  margin: 0 !important;
  color: var(--hp-muted) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

/* 7. Composer productivo existente (#beta20ComposerPanel) */
#beta20ComposerPanel.beta20-panel.beta20-create {
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-lg) !important;
  background: linear-gradient(180deg, rgba(11, 23, 37, 0.94), rgba(7, 16, 27, 0.98)) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24) !important;
  padding: clamp(20px, 3vw, 32px) !important;
}

#beta20ComposerPanel header .account-kicker {
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  font-weight: 700 !important;
}

#beta20ComposerPanel header h3 {
  margin: 6px 0 8px !important;
  color: var(--hp-ivory) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: clamp(20px, 2.4vw, 26px) !important;
  font-weight: 500 !important;
}

#beta20ComposerPanel header small {
  color: var(--hp-muted) !important;
  font-size: 13px !important;
}

#beta20ComposerPanel .composer-card.beta20-composer {
  margin-top: 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

#beta20ComposerPanel #activityText {
  width: 100% !important;
  min-height: 110px !important;
  box-sizing: border-box !important;
  padding: 14px 16px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-sm) !important;
  background: rgba(5, 11, 20, 0.85) !important;
  color: var(--hp-ivory) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
  resize: vertical !important;
  transition: border-color var(--hp-transition), box-shadow var(--hp-transition) !important;
}

#beta20ComposerPanel #activityText:focus {
  border-color: var(--hp-gold) !important;
  outline: 2px solid var(--hp-focus) !important;
  outline-offset: 1px !important;
  box-shadow: 0 0 16px rgba(215, 182, 108, 0.15) !important;
}

#beta20ComposerPanel #publishActivity {
  align-self: flex-start !important;
  padding: 12px 24px !important;
  border: 1px solid rgba(179, 138, 69, 0.72) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #c99e4f, #b38a45) !important;
  color: #07101b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(179, 138, 69, 0.25) !important;
  cursor: pointer !important;
  transition: transform var(--hp-transition), filter var(--hp-transition) !important;
}

#beta20ComposerPanel #publishActivity:hover {
  transform: translateY(-1px) !important;
  filter: brightness(1.06) !important;
}

#beta20ComposerPanel #publishActivity:active {
  transform: translateY(0) !important;
  filter: brightness(0.96) !important;
}

#beta20ComposerPanel .humanity-memory-people-picker {
  padding: 12px 14px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-sm) !important;
  background: rgba(7, 16, 27, 0.6) !important;
}

#beta20ComposerPanel .humanity-memory-people-picker summary {
  color: var(--hp-gold-strong) !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

#beta20ComposerPanel .humanity-memory-person-toggle {
  padding: 6px 12px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 999px !important;
  background: rgba(12, 23, 37, 0.6) !important;
  color: var(--hp-text) !important;
  font-size: 12px !important;
  transition: all var(--hp-transition) !important;
}

#beta20ComposerPanel .humanity-memory-person-toggle[aria-pressed="true"] {
  border-color: var(--hp-gold-strong) !important;
  background: rgba(215, 182, 108, 0.18) !important;
  color: var(--hp-ivory) !important;
  font-weight: 600 !important;
}

/* 8. Detalle de Historia (#hmemoryOverlay & .hmemory-sheet) */
html body .hmemory-sheet {
  width: min(940px, 94vw) !important;
  max-height: min(800px, 90dvh) !important;
  border: 1px solid var(--hp-line) !important;
  border-radius: var(--hp-radius-xl) !important;
  background: linear-gradient(160deg, #0d1724, #07101b) !important;
  box-shadow: var(--hp-overlay-shadow) !important;
  overflow: auto !important;
}

html body .hmemory-visual {
  padding: 36px 28px !important;
  border-right: 1px solid var(--hp-line-soft) !important;
  background: radial-gradient(circle at 50% 35%, rgba(215, 182, 108, 0.14), transparent 45%), linear-gradient(160deg, #0e1927, #060d16 80%) !important;
}

html body .hmemory-visual-mark {
  width: 56px !important;
  height: 56px !important;
  border: 1px solid rgba(215, 182, 108, 0.35) !important;
  border-radius: 18px !important;
  background: rgba(215, 182, 108, 0.1) !important;
  color: var(--hp-gold-strong) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: 30px !important;
  box-shadow: 0 0 24px rgba(215, 182, 108, 0.12) !important;
}

html body #hmemoryVisualMeta {
  color: var(--hp-gold-strong) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
}

html body .hmemory-content {
  padding: 44px 38px 36px !important;
}

html body #hmemoryEyebrow {
  color: var(--hp-gold-strong) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

html body #hmemoryTitle {
  margin: 8px 0 18px !important;
  color: var(--hp-ivory) !important;
  font-family: Georgia, "Playfair Display", "Times New Roman", serif !important;
  font-size: clamp(28px, 3.2vw, 42px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  word-break: break-word !important;
}

html body #hmemoryBody {
  margin: 0 0 24px !important;
  color: var(--hp-text) !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

html body .hmemory-meta {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--hp-line-soft) !important;
  display: grid !important;
  grid-template-columns: 1.4fr 1fr 1fr !important;
  gap: 10px !important;
}

html body .hmemory-meta > div,
html body .hmemory-person {
  padding: 12px 14px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-sm) !important;
  background: rgba(7, 16, 27, 0.7) !important;
}

html body .hmemory-meta small {
  color: var(--hp-muted) !important;
  font-size: 9.5px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

html body .hmemory-meta strong {
  margin-top: 4px !important;
  color: var(--hp-ivory) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

html body .hmemory-person b {
  color: var(--hp-ivory) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

html body .hmemory-person span {
  border: 1px solid rgba(215, 182, 108, 0.3) !important;
  background: rgba(215, 182, 108, 0.15) !important;
  color: var(--hp-gold-strong) !important;
}

html body .humanity-memory-linked-chip {
  padding: 6px 12px !important;
  border: 1px solid rgba(215, 182, 108, 0.25) !important;
  border-radius: 999px !important;
  background: rgba(215, 182, 108, 0.08) !important;
  color: #d7c7ab !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  transition: all var(--hp-transition) !important;
}

html body .humanity-memory-linked-chip:hover {
  border-color: var(--hp-gold-strong) !important;
  background: rgba(215, 182, 108, 0.16) !important;
  color: var(--hp-ivory) !important;
}

html body .hmemory-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  margin-top: 28px !important;
}

html body #hmemoryBack {
  padding: 10px 18px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--hp-text) !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

html body #hmemoryTree {
  padding: 10px 20px !important;
  border: 1px solid rgba(179, 138, 69, 0.72) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #c99e4f, #b38a45) !important;
  color: #07101b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(179, 138, 69, 0.2) !important;
  cursor: pointer !important;
}

/* 9. Responsive */
@media (max-width: 900px) {
  .beta20-memories.humanity-product-v1 .beta20-page-head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .beta20-memories.humanity-product-v1 #beta20MemoryCreateTop {
    width: 100% !important;
  }
  .beta20-memories.humanity-product-v1 .beta20-memory-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  html body .hmemory-sheet {
    width: 100% !important;
    max-height: 92dvh !important;
    grid-template-columns: 1fr !important;
    border-radius: 24px 24px 0 0 !important;
  }
  html body .hmemory-visual {
    min-height: 150px !important;
    padding: 20px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--hp-line-soft) !important;
  }
  html body .hmemory-content {
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom)) !important;
  }
  html body .hmemory-meta {
    grid-template-columns: 1fr !important;
  }
  html body .hmemory-actions {
    flex-direction: column-reverse !important;
  }
  html body .hmemory-actions .account-action {
    width: 100% !important;
  }
}

/**
 * Visual Convergence V1 — Product Shell (Sidebar, Brand, Top Appbar, Profile Mini, Mobile Dock).
 * Porta el lenguaje editorial y noche profunda de product-nav.css / stories-v1 / profile-human-v1
 * al shell productivo de Beta20 sin alterar selectores, router ni contratos de navegación.
 */

/* 1. Brand Lockup en Sidebar */
.account-modal:not(.auth-only) .social-sidebar::before,
.account-modal:not(.auth-only) .social-sidebar::after {
  content: none !important;
  display: none !important;
}

.account-modal:not(.auth-only) .humanity-product-sidebar-brand {
  order: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 4px 22px !important;
  padding: 4px 0 !important;
  text-decoration: none !important;
  user-select: none !important;
}

.account-modal:not(.auth-only) .humanity-product-sidebar-brand .humanity-product-mark {
  flex: 0 0 34px !important;
  width: 34px !important;
  height: 34px !important;
}

.account-modal:not(.auth-only) .humanity-product-sidebar-brand .humanity-product-brand-copy {
  display: grid !important;
  gap: 2px !important;
}

.account-modal:not(.auth-only) .humanity-product-sidebar-brand .humanity-product-brand-copy small {
  color: var(--hp-gold-strong, #efc76f) !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: 0.32em !important;
  text-transform: uppercase !important;
}

.account-modal:not(.auth-only) .humanity-product-sidebar-brand .humanity-product-brand-copy span {
  color: var(--hp-ivory, #f4ecdd) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0.16em !important;
  line-height: 1 !important;
}

/* 2. Sidebar Container */
.account-modal:not(.auth-only) .social-sidebar {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: var(--hrc-sidebar, 258px) !important;
  height: 100dvh !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 24px 18px 18px !important;
  border-right: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.14)) !important;
  background: linear-gradient(180deg, #09121d 0%, #060e18 55%, #040910 100%) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* 3. Social Navigation Rail */
.account-modal:not(.auth-only) .social-nav {
  order: 2 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 4px 0 14px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(215, 182, 108, 0.22) transparent !important;
}

.account-modal:not(.auth-only) .social-nav::-webkit-scrollbar {
  display: block !important;
  width: 5px !important;
}

.account-modal:not(.auth-only) .social-nav::-webkit-scrollbar-thumb {
  background: rgba(215, 182, 108, 0.22) !important;
  border-radius: 999px !important;
}

.account-modal:not(.auth-only) .social-nav::before {
  content: "NAVEGACIÓN" !important;
  display: block !important;
  padding: 2px 12px 10px !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  opacity: 0.8 !important;
}

.account-modal:not(.auth-only) .social-nav button {
  width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  gap: 12px !important;
  display: flex !important;
  align-items: center !important;
  border: 1px solid transparent !important;
  border-radius: var(--hp-radius-sm, 12px) !important;
  background: transparent !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all var(--hp-transition, 180ms ease) !important;
  box-sizing: border-box !important;
}

.account-modal:not(.auth-only) .social-nav button svg {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 19px !important;
  stroke: currentColor !important;
  stroke-width: 1.7 !important;
  transition: color var(--hp-transition, 180ms ease) !important;
}

.account-modal:not(.auth-only) .social-nav button:hover {
  background: rgba(215, 182, 108, 0.06) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  border-color: rgba(215, 182, 108, 0.12) !important;
  transform: translateX(2px) !important;
}

.account-modal:not(.auth-only) .social-nav button:focus-visible {
  outline: 2px solid var(--hp-focus, rgba(240, 213, 150, 0.82)) !important;
  outline-offset: 1px !important;
}

/* Active State */
.account-modal:not(.auth-only) .social-nav button.active {
  background: linear-gradient(90deg, rgba(215, 182, 108, 0.14), rgba(215, 182, 108, 0.03)) !important;
  border-color: rgba(215, 182, 108, 0.26) !important;
  border-left: 3px solid var(--hp-gold-strong, #efc76f) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
  transform: none !important;
}

.account-modal:not(.auth-only) .social-nav button.active svg {
  color: var(--hp-gold-strong, #efc76f) !important;
}

.account-modal:not(.auth-only) .social-nav .beta20-nav-divider {
  height: 1px !important;
  margin: 8px 10px !important;
  background: var(--hp-line-soft, rgba(215, 182, 108, 0.14)) !important;
}

/* 4. Profile Mini Widget (Bottom of Sidebar) */
.account-modal:not(.auth-only) .profile-mini {
  order: 3 !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  min-height: 68px !important;
  margin: 10px 0 0 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.14)) !important;
  border-radius: var(--hp-radius-md, 16px) !important;
  background: linear-gradient(180deg, rgba(11, 23, 37, 0.85), rgba(7, 16, 27, 0.95)) !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  transition: border-color var(--hp-transition, 180ms ease) !important;
}

.account-modal:not(.auth-only) .profile-mini:hover {
  border-color: var(--hp-line, rgba(215, 182, 108, 0.28)) !important;
}

.account-modal:not(.auth-only) .profile-mini .profile-avatar {
  width: 40px !important;
  height: 40px !important;
  flex: 0 0 40px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(215, 182, 108, 0.42) !important;
  background: radial-gradient(circle, #2b261e, #0b1521 70%) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-family: Georgia, serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(215, 182, 108, 0.12) !important;
  display: grid !important;
  place-items: center !important;
}

.account-modal:not(.auth-only) .profile-mini strong {
  max-width: 145px !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.account-modal:not(.auth-only) .profile-mini span {
  max-width: 145px !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 9.5px !important;
  margin-top: 2px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* 5. Top Contextual Appbar (.df-appbar) */
.df-appbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 500 !important;
  min-height: var(--hrc-header, 82px) !important;
  margin: 0 -24px 26px !important;
  padding: 0 28px !important;
  grid-template-columns: minmax(180px, .8fr) auto minmax(320px, 470px) 46px !important;
  gap: 16px !important;
  border-bottom: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.12)) !important;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0.96), rgba(5, 11, 20, 0.88)) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  box-shadow: none !important;
}

.df-family strong {
  color: var(--hp-ivory, #f4ecdd) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

.df-family small {
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 11px !important;
}

.df-search {
  border: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.16)) !important;
  background: rgba(9, 19, 31, 0.75) !important;
  border-radius: 999px !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  padding: 0 14px !important;
  transition: border-color var(--hp-transition, 180ms ease), box-shadow var(--hp-transition, 180ms ease) !important;
}

.df-search input {
  height: 44px !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-size: 13px !important;
}

.df-search input::placeholder {
  color: var(--hp-muted, #98a6b7) !important;
  opacity: 0.75 !important;
}

.df-search:focus-within {
  border-color: var(--hp-gold, #d7b66c) !important;
  box-shadow: 0 0 16px rgba(215, 182, 108, 0.15) !important;
}

.df-search kbd {
  border: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.2)) !important;
  background: rgba(5, 11, 20, 0.65) !important;
  color: var(--hp-muted, #98a6b7) !important;
  border-radius: 6px !important;
  font-size: 10px !important;
  padding: 2px 6px !important;
}

.df-invite {
  min-height: 44px !important;
  padding: 0 20px !important;
  border: 1px solid rgba(215, 182, 108, 0.35) !important;
  border-radius: 999px !important;
  background: rgba(215, 182, 108, 0.08) !important;
  color: var(--hp-sand-light, #f0dfb8) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  transition: all var(--hp-transition, 180ms ease) !important;
}

.df-invite:hover {
  border-color: var(--hp-gold-strong, #efc76f) !important;
  background: rgba(215, 182, 108, 0.16) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  transform: translateY(-1px) !important;
}

.df-profile {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(215, 182, 108, 0.42) !important;
  background: radial-gradient(circle, #2b261e, #0b1521 70%) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-family: Georgia, serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(215, 182, 108, 0.12) !important;
  cursor: pointer !important;
  transition: all var(--hp-transition, 180ms ease) !important;
}

.df-profile:hover {
  border-color: var(--hp-gold-strong, #efc76f) !important;
  box-shadow: 0 0 20px rgba(215, 182, 108, 0.25) !important;
  transform: scale(1.04) !important;
}

/* 6. Mobile Dock & Adaptations */
@media (max-width: 680px) {
  .account-modal:not(.auth-only) .social-sidebar {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    z-index: 10032 !important;
    width: auto !important;
    height: var(--mobile-nav-h, 66px) !important;
    min-height: var(--mobile-nav-h, 66px) !important;
    padding: 6px 8px !important;
    border: 1px solid var(--hp-line-soft, rgba(215, 182, 108, 0.22)) !important;
    border-radius: 24px !important;
    background: rgba(5, 11, 20, 0.94) !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 20px rgba(215, 182, 108, 0.08) !important;
    backdrop-filter: blur(3px) !important;
    -webkit-backdrop-filter: blur(3px) !important;
    display: block !important;
  }

  .account-modal:not(.auth-only) .humanity-product-sidebar-brand,
  .account-modal:not(.auth-only) .profile-mini,
  .account-modal:not(.auth-only) .social-nav::before {
    display: none !important;
  }

  .account-modal:not(.auth-only) .social-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
  }

  .account-modal:not(.auth-only) .social-nav::-webkit-scrollbar {
    display: none !important;
  }

  .account-modal:not(.auth-only) .social-nav button {
    display: flex !important;
    flex: 0 0 68px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 6px 3px !important;
    border-radius: 17px !important;
    color: var(--hp-muted, #8f8b81) !important;
    font-size: 10px !important;
    line-height: 1 !important;
    text-align: center !important;
    transform: none !important;
  }

  .account-modal:not(.auth-only) .social-nav button:hover {
    transform: none !important;
  }

  .account-modal:not(.auth-only) .social-nav button.active {
    background: linear-gradient(180deg, rgba(215, 182, 108, 0.18), rgba(215, 182, 108, 0.06)) !important;
    color: var(--hp-gold-strong, #efc76f) !important;
    border-color: rgba(215, 182, 108, 0.25) !important;
    border-left: 1px solid rgba(215, 182, 108, 0.25) !important;
    box-shadow: inset 0 0 0 1px rgba(215, 182, 108, 0.12) !important;
  }
}

/**
 * Visual Convergence V1 — Mis Raíces (F3 Tree Chrome).
 * Porta el lenguaje editorial y noche profunda a Mis Raíces (F3)
 * SIN modificar geometría, relaciones, ownership, privacidad ni cálculo de layout F3.
 */

/* Shell Container de Mis Raíces */
.account-view[data-view="tree"] .humanidad-f3-shell {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: var(--hp-bg-deep, #050b14) !important;
  overflow: hidden !important;
}

/* 1. Header de Mis Raíces (.tree-social-head) — Slim Editorial Header */
.account-view[data-view="tree"] .tree-social-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 16px 6px !important;
  border-bottom: 1px solid var(--hp-line-soft) !important;
  background: linear-gradient(180deg, rgba(9, 18, 29, 0.95), rgba(6, 14, 24, 0.9)) !important;
  flex: 0 0 auto !important;
}

.account-view[data-view="tree"] .tree-social-head > div:first-child {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.account-view[data-view="tree"] .tree-social-head h2#familyTreeName {
  font-family: 'Playfair Display', Georgia, "Times New Roman", serif !important;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem) !important;
  font-weight: 600 !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

.account-view[data-view="tree"] .tree-social-head .account-kicker {
  color: var(--hp-gold, #d7b66c) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}

.account-view[data-view="tree"] .tree-head-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex-wrap: wrap !important;
}

.account-view[data-view="tree"] .tree-selector-wrap {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.account-view[data-view="tree"] .tree-selector-wrap select {
  min-height: 32px !important;
  padding: 0 24px 0 10px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 8px !important;
  background: rgba(9, 19, 31, 0.85) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: border-color var(--hp-transition), box-shadow var(--hp-transition) !important;
}

.account-view[data-view="tree"] .tree-selector-wrap select:focus-visible {
  outline: 2px solid var(--hp-focus) !important;
  border-color: var(--hp-gold) !important;
}

.account-view[data-view="tree"] .tree-head-actions .account-action {
  min-height: 32px !important;
  padding: 0 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
}

/* 2. Toolbar de Mis Raíces (.f3-toolbar-v1) */
.account-view[data-view="tree"] .humanidad-f3-toolbar.f3-toolbar-v1 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 6px 16px !important;
  background: rgba(6, 13, 22, 0.94) !important;
  border-bottom: 1px solid var(--hp-line-soft) !important;
  flex: 0 0 auto !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}

.account-view[data-view="tree"] .f3-nav-buttons,
.account-view[data-view="tree"] .f3-right-controls {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.account-view[data-view="tree"] .humanidad-f3-toolbar .f3-btn {
  min-height: 32px !important;
  padding: 0 12px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 999px !important;
  background: rgba(11, 23, 37, 0.65) !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all var(--hp-transition) !important;
}

.account-view[data-view="tree"] .humanidad-f3-toolbar .f3-btn:hover {
  border-color: rgba(215, 182, 108, 0.35) !important;
  background: rgba(215, 182, 108, 0.08) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
}

.account-view[data-view="tree"] .humanidad-f3-toolbar .f3-btn:focus-visible {
  outline: 2px solid var(--hp-focus) !important;
}

.account-view[data-view="tree"] .humanidad-f3-toolbar .f3-btn.primary {
  border-color: rgba(215, 182, 108, 0.35) !important;
  background: rgba(215, 182, 108, 0.14) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-weight: 700 !important;
}

.account-view[data-view="tree"] .humanidad-f3-toolbar .f3-select {
  min-height: 32px !important;
  padding: 0 28px 0 10px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 8px !important;
  background: rgba(9, 19, 31, 0.85) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

.account-view[data-view="tree"] .f3-state-legend {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 10.5px !important;
}

.account-view[data-view="tree"] .f3-state-legend span {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.account-view[data-view="tree"] .f3-state-legend i {
  display: inline-block !important;
  width: 6px !important;
  height: 6px !important;
  border-radius: 50% !important;
}

.account-view[data-view="tree"] .f3-state-legend i.connected {
  background: #4ade80 !important;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4) !important;
}

.account-view[data-view="tree"] .f3-state-legend i.unconnected {
  background: #e2b769 !important;
  box-shadow: 0 0 8px rgba(226, 183, 105, 0.4) !important;
}

.account-view[data-view="tree"] .f3-state-legend i.memorial {
  background: #a78bfa !important;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.4) !important;
}

/* 3. Stage de Mis Raíces (.humanidad-f3-stage) — SIN MODIFICAR COORDENADAS NI TRANSFORMS */
.account-view[data-view="tree"] .humanidad-f3-stage {
  position: relative !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
  background: radial-gradient(circle at 50% 35%, rgba(215, 182, 108, 0.05), transparent 50%),
              linear-gradient(180deg, #050b14 0%, #03070d 100%) !important;
  border-bottom: 1px solid var(--hp-line-soft) !important;
}

/* 4. Cards / Nodes (.humanidad-f3-card) — PRESERVANDO ANCHO, ALTO Y GEOMETRÍA ESTRUCTURAL */
.account-view[data-view="tree"] .humanidad-f3-card {
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-sm, 12px) !important;
  background: linear-gradient(180deg, rgba(11, 23, 37, 0.94), rgba(7, 16, 27, 0.96)) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
  transition: border-color var(--hp-transition), box-shadow var(--hp-transition) !important;
}

.account-view[data-view="tree"] .humanidad-f3-stage .card:hover .humanidad-f3-card {
  border-color: rgba(215, 182, 108, 0.45) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 16px rgba(215, 182, 108, 0.12) !important;
}

.account-view[data-view="tree"] .humanidad-f3-stage .card.node-selected .humanidad-f3-card {
  border-color: var(--hp-gold-strong, #efc76f) !important;
  box-shadow: 0 0 24px rgba(215, 182, 108, 0.28), 0 12px 36px rgba(0, 0, 0, 0.5) !important;
}

.account-view[data-view="tree"] .humanidad-f3-avatar {
  border: 1px solid rgba(215, 182, 108, 0.42) !important;
  background: radial-gradient(circle, #2b261e, #0b1521 70%) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-family: Georgia, serif !important;
}

.account-view[data-view="tree"] .humanidad-f3-card .humanidad-f3-name {
  color: var(--hp-ivory, #f4ecdd) !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 600 !important;
}

.account-view[data-view="tree"] .humanidad-f3-card .humanidad-f3-role {
  color: var(--hp-gold-soft, #dfc080) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}

.account-view[data-view="tree"] .humanidad-f3-card .humanidad-f3-life {
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 9.5px !important;
}

.account-view[data-view="tree"] .humanidad-f3-card.is-memorial {
  border-color: rgba(167, 139, 250, 0.35) !important;
}

.account-view[data-view="tree"] .humanidad-f3-card.is-memorial .ht-memory-light {
  color: #c4b5fd !important;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.6) !important;
}

/* 5. Unlinked & Footer */
.account-view[data-view="tree"] .humanidad-f3-unlinked {
  margin: 16px 20px !important;
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: var(--hp-radius-md, 16px) !important;
  background: rgba(9, 19, 31, 0.65) !important;
  padding: 14px 18px !important;
}

.account-view[data-view="tree"] .humanidad-f3-unlinked summary {
  color: var(--hp-sand-light, #f0dfb8) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

.account-view[data-view="tree"] .humanidad-f3-unlinked-list button {
  border: 1px solid var(--hp-line-soft) !important;
  border-radius: 999px !important;
  background: rgba(11, 23, 37, 0.8) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  font-size: 11px !important;
  padding: 5px 14px !important;
  cursor: pointer !important;
  transition: all var(--hp-transition) !important;
}

.account-view[data-view="tree"] .humanidad-f3-unlinked-list button:hover {
  border-color: var(--hp-gold) !important;
  color: var(--hp-gold-strong) !important;
}

.account-view[data-view="tree"] .humanidad-f3-footer {
  padding: 16px 24px !important;
  color: var(--hp-muted, #98a6b7) !important;
  font-size: 11px !important;
  border-top: 1px solid var(--hp-line-soft) !important;
  background: rgba(6, 13, 22, 0.8) !important;
}

.account-view[data-view="tree"] .humanidad-f3-footer strong {
  color: var(--hp-ivory, #f4ecdd) !important;
}

/* 6. Person Drawer (.ht-person-drawer) — Contrato de Overlay y Estilo Humano */
.person-drawer.ht-person-drawer {
  background: #070e17 !important;
  border: 1px solid var(--hp-line, rgba(215, 182, 108, 0.28)) !important;
  border-radius: var(--hp-radius-lg, 24px) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 20px rgba(215, 182, 108, 0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.person-drawer.ht-person-drawer .ht-drawer-header {
  border-bottom: 1px solid var(--hp-line-soft) !important;
  padding: 18px 20px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.person-drawer.ht-person-drawer .ht-drawer-avatar {
  border: 1px solid rgba(215, 182, 108, 0.42) !important;
  background: radial-gradient(circle, #2b261e, #0b1521 70%) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-family: Georgia, serif !important;
  box-shadow: 0 0 16px rgba(215, 182, 108, 0.12) !important;
}

.person-drawer.ht-person-drawer .ht-drawer-name {
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 21px !important;
  font-weight: 600 !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  letter-spacing: -0.01em !important;
}

.person-drawer.ht-person-drawer .ht-drawer-role {
  color: var(--hp-gold-strong, #efc76f) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.person-drawer.ht-person-drawer .ht-section-title {
  color: var(--hp-sand-light, #f0dfb8) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.person-drawer.ht-person-drawer .ht-posicion {
  border: 1px solid var(--hp-line-soft) !important;
  background: rgba(9, 19, 31, 0.7) !important;
  border-radius: var(--hp-radius-sm, 12px) !important;
}

.person-drawer.ht-person-drawer .ht-posicion strong {
  color: var(--hp-ivory, #f4ecdd) !important;
}

.person-drawer.ht-person-drawer .ht-related-card {
  border: 1px solid var(--hp-line-soft) !important;
  background: rgba(11, 23, 37, 0.6) !important;
  border-radius: var(--hp-radius-sm, 12px) !important;
  transition: all var(--hp-transition) !important;
}

.person-drawer.ht-person-drawer .ht-related-card:hover {
  border-color: rgba(215, 182, 108, 0.35) !important;
  background: rgba(215, 182, 108, 0.06) !important;
}

.person-drawer.ht-person-drawer .ht-quick-btn {
  border: 1px solid var(--hp-line-soft) !important;
  background: rgba(11, 23, 37, 0.7) !important;
  color: var(--hp-ivory, #f4ecdd) !important;
  border-radius: var(--hp-radius-sm, 12px) !important;
  transition: all var(--hp-transition) !important;
}

.person-drawer.ht-person-drawer .ht-quick-btn:hover {
  border-color: rgba(215, 182, 108, 0.35) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  background: rgba(215, 182, 108, 0.08) !important;
}

/* 7. Responsive Mis Raíces */
@media (max-width: 900px) {
  .account-view[data-view="tree"] .tree-header-v1 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 16px 18px !important;
  }

  .account-view[data-view="tree"] .tree-header-right {
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }

  .account-view[data-view="tree"] .tree-selector-v1 {
    flex: 1 !important;
  }

  .account-view[data-view="tree"] .humanidad-f3-toolbar.f3-toolbar-v1 {
    padding: 10px 16px !important;
  }
}

/* HUMANIDAD EMPTY STATES — ARCHIVE & CONVERSATIONS V1
   Presentation-only states for a new family archive. They disappear as soon
   as real memories/conversations render and never replace product actions. */
.beta20-memories.humanity-product-v1 .beta20-memory-grid:empty {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  min-height: clamp(300px, 43vh, 390px) !important;
  margin-top: 6px !important;
  padding: 44px clamp(22px, 5vw, 64px) !important;
  overflow: hidden !important;
  border: 1px solid rgba(215, 182, 108, 0.14) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 50% 8%, rgba(215, 182, 108, 0.10), transparent 34%),
    radial-gradient(circle at 78% 78%, rgba(88, 139, 190, 0.07), transparent 30%),
    linear-gradient(155deg, rgba(13, 25, 39, 0.78), rgba(5, 12, 21, 0.88)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025) !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-grid:empty::before {
  content: "✦" !important;
  position: absolute !important;
  top: 58px !important;
  left: 50% !important;
  display: grid !important;
  place-items: center !important;
  width: 54px !important;
  height: 54px !important;
  border: 1px solid rgba(215, 182, 108, 0.32) !important;
  border-radius: 50% !important;
  background: rgba(215, 182, 108, 0.045) !important;
  color: var(--hp-gold-strong, #efc76f) !important;
  font-size: 17px !important;
  box-shadow: 0 0 40px rgba(215, 182, 108, 0.08) !important;
  transform: translateX(-50%) !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-grid:empty::after {
  content: "Tu archivo empieza con una historia.\A\AUna anécdota, una receta, una frase o un momento compartido puede ser el comienzo." !important;
  display: block !important;
  max-width: 570px !important;
  margin-top: 66px !important;
  color: var(--hp-muted, #9aa5b3) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  text-align: center !important;
  white-space: pre-line !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-grid:empty + .beta20-memory-note {
  max-width: 680px !important;
  margin: 16px auto 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(154, 165, 179, 0.64) !important;
  font-size: 11px !important;
  line-height: 1.55 !important;
  text-align: center !important;
}

.beta20-memories.humanity-product-v1 .beta20-memory-grid:empty ~ .beta20-memory-note::before {
  content: "ARCHIVO VIVO · " !important;
  color: rgba(215, 182, 108, 0.62) !important;
  font-weight: 700 !important;
  letter-spacing: 0.10em !important;
}

.account-view[data-view="messages"] .chat-panel .empty-chat,
.account-view[data-view="messages"] .chat-panel [data-humanity-message-empty] {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  min-height: 100% !important;
  max-width: none !important;
  padding: clamp(36px, 7vw, 72px) clamp(24px, 8vw, 96px) !important;
  background:
    radial-gradient(circle at 50% 38%, rgba(215, 182, 108, 0.055), transparent 26%),
    radial-gradient(circle at 50% 52%, rgba(82, 132, 181, 0.045), transparent 36%) !important;
  color: var(--hp-muted, #9aa5b3) !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  text-align: center !important;
}

.account-view[data-view="messages"] .chat-panel .empty-chat::after,
.account-view[data-view="messages"] .chat-panel [data-humanity-message-empty]::after {
  content: "" !important;
  order: -2 !important;
  width: 48px !important;
  height: 48px !important;
  margin-bottom: 4px !important;
  border: 1px solid rgba(215, 182, 108, 0.22) !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(215, 182, 108, 0.18) 0 2px, transparent 3px),
    rgba(215, 182, 108, 0.035) !important;
  box-shadow: 0 0 34px rgba(215, 182, 108, 0.055) !important;
}

@media (max-width: 680px) {
  .beta20-memories.humanity-product-v1 .beta20-memory-toolbar {
    margin-bottom: 14px !important;
  }

  .beta20-memories.humanity-product-v1 .beta20-memory-grid:empty {
    min-height: 330px !important;
    padding: 34px 22px !important;
    border-radius: 20px !important;
  }

  .beta20-memories.humanity-product-v1 .beta20-memory-grid:empty::before {
    top: 48px !important;
    width: 50px !important;
    height: 50px !important;
  }

  .beta20-memories.humanity-product-v1 .beta20-memory-grid:empty::after {
    margin-top: 60px !important;
    font-size: 14px !important;
  }

  .account-view[data-view="messages"] .chat-panel .empty-chat,
  .account-view[data-view="messages"] .chat-panel [data-humanity-message-empty] {
    min-height: 360px !important;
    padding: 42px 26px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .beta20-memories.humanity-product-v1 .beta20-memory-grid:empty::before,
  .account-view[data-view="messages"] .chat-panel .empty-chat::after,
  .account-view[data-view="messages"] .chat-panel [data-humanity-message-empty]::after {
    transition: none !important;
  }
}

