/*
 * Ficha del rescatado (nueva web).
 * Diseño: docs/web-usuarios/lienzo4/Main.dc.html (teléfono) y
 * Escritorio.dc.html (escritorio).
 *
 * Un solo HTML para los dos. Teléfono primero: una columna. Desde 768 px la
 * foto y la tarjeta de datos van arriba, y la historia y los comentarios
 * debajo, lado a lado.
 *
 * Solo variables: colores, radios y sombras viven en tokens.css.
 */

/* ── Encabezado de teléfono ─────────────────────────────────────────── */
.nw-ficha-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--v5-border);
  background: var(--v5-surface);
}
.nw-ficha-header__back {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--v5-r2);
  color: var(--v5-ink);
  font-size: 16px;
}
.nw-ficha-header__back:hover {
  background: var(--v5-surface-muted);
  color: var(--v5-ink);
}
.nw-ficha-header__app {
  gap: 7px;
  margin-left: auto;
  padding: 0 14px;
  font-size: 13px;
}
.nw-ficha-header__app .nw-i {
  font-size: 13px;
}

/* ── Página ─────────────────────────────────────────────────────────── */
/* En teléfono el contenido usa todo el ancho, con 16 px a cada lado. */
.nw-ficha {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 28px;
}

/* Las tres cajas que arman el escritorio no existen en teléfono: sus hijos
   pasan a la columna. El HTML lleva «Sobre» y «Responsable» junto al nombre
   (así los agrupa la tarjeta de escritorio); `order` deja la historia antes
   de ellos, como en el lienzo de teléfono. */
.nw-ficha__top,
.nw-ficha__data,
.nw-ficha__mid {
  display: contents;
}
.nw-ficha__about,
.nw-org,
.nw-ficha__comments,
.nw-ficha__help,
.nw-spot,
.nw-ficha__related,
.nw-ficha__landings {
  order: 1;
}
.nw-ficha__alert,
.nw-ficha__story,
.nw-ficha__about,
.nw-org,
.nw-ficha__comments,
.nw-ficha__help,
.nw-spot,
.nw-ficha__related,
.nw-ficha__landings {
  margin-top: 24px;
}

/* ── Saludo de difusión ─────────────────────────────────────────────── */
.nw-ficha__referral {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--nw-r-md);
  background: var(--v5-primary-softer);
  font-size: var(--v5-text-body);
  font-weight: 400;
  line-height: 1.45;
}
.nw-ficha__referral strong {
  font-weight: 700;
}
.nw-ficha__referral-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--nw-r-round);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 13px;
}

/* ── Foto y galería ─────────────────────────────────────────────────── */
.nw-ficha__media {
  min-width: 0;
  margin-top: 12px;
}
.nw-ficha__photo {
  position: relative;
  height: 380px;
  border-radius: var(--v5-r4);
  overflow: hidden;
  background: var(--v5-ink);
  box-shadow: var(--v5-shadow-raised);
}
.nw-ficha__photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.nw-ficha__photo-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v5-text-light);
  font-size: 56px;
}
/* Reproductor de un video de la galería, sobre la foto. */
.nw-ficha__video {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--v5-ink);
}
.nw-ficha__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.nw-ficha__place {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--v5-r-pill);
  background: var(--nw-scrim);
  color: var(--v5-surface);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.nw-ficha__place-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--nw-r-round);
  background: var(--v5-surface);
}
/* Con un video en pantalla la comuna taparía sus controles. */
.nw-ficha__photo.is-video .nw-ficha__place {
  display: none;
}
/* «Seguir» sobre la foto es de escritorio; en teléfono va en la barra. */
.nw-ficha__photo-follow {
  display: none;
}

.nw-ficha__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nw-ficha__thumbs li {
  flex: none;
}
.nw-ficha__thumb {
  position: relative;
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--v5-r2);
  overflow: hidden;
  background: var(--v5-surface-muted);
}
.nw-ficha__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nw-ficha__thumb[aria-current='true'] {
  border-color: var(--v5-primary);
}
/* Marca de video: triángulo sobre un círculo oscuro. */
.nw-ficha__thumb--video::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: var(--nw-r-round);
  background: var(--nw-scrim);
}
.nw-ficha__thumb--video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -6px 0 0 -3px;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent var(--v5-surface);
}

/* ── Nombre, chips y cifras ─────────────────────────────────────────── */
/* El margen negativo deja 20 px, y no 24, antes del primer bloque. */
.nw-ficha__name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 16px 0 -4px;
}
.nw-ficha__overline {
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 1.2px;
  line-height: 1.3;
}
.nw-ficha__title {
  margin-top: 6px;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
/* El H1 lleva el nombre como lo escribió la fundación (igual que la ficha
   actual); aquí solo se le sube la inicial, como en el resto de la página. */
.nw-ficha__title::first-letter {
  text-transform: uppercase;
}
.nw-ficha__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
/* Aviso de días («335 días esperando un hogar»), como la ficha actual: una
   fila compacta bajo los datos. Más de 180 días, en tono de alerta. */
.nw-ficha__wait {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--v5-primary-soft);
  border-radius: var(--nw-r-md);
  background: var(--v5-primary-softer);
}
.nw-ficha__wait-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--nw-r-sm);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: 15px;
}
.nw-ficha__wait-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.nw-ficha__wait-title {
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-body);
  font-weight: 700;
  line-height: 1.3;
}
.nw-ficha__wait-note {
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}
.nw-ficha__wait--urgent {
  border-color: var(--v5-dupla-soft);
  background: var(--v5-dupla-soft);
}
.nw-ficha__wait--urgent .nw-ficha__wait-icon {
  background: var(--v5-surface);
  color: var(--v5-tint-law-ink);
}
.nw-ficha__wait--urgent .nw-ficha__wait-title {
  color: var(--v5-tint-law-ink);
}
.nw-ficha__wait--urgent .nw-ficha__wait-note {
  color: var(--v5-dupla-ink);
}

/* Cifras de hoy (difusiones y vistas): ocultas hasta que cuenta.js tiene
   el dato. Las visibles se reparten el ancho; sin ninguna, la fila no
   ocupa lugar. */
.nw-ficha__stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.nw-ficha__stats:not(:has(> .nw-stat:not([hidden]))) {
  display: none;
}
.nw-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r2);
  background: var(--v5-surface);
  text-align: center;
}
.nw-stat[hidden] {
  display: none;
}
.nw-stat__num {
  font-size: 20px;
  line-height: 1.1;
}
.nw-stat--shares .nw-stat__num {
  color: var(--v5-primary);
}
.nw-stat--views .nw-stat__num {
  color: var(--v5-tint-game-ink);
}
.nw-stat__label {
  color: var(--v5-text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.3;
}
.nw-ficha__followers {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 700;
}
.nw-ficha__followers .nw-i {
  color: var(--v5-primary);
  font-size: var(--v5-text-body);
}

/* Las acciones de la tarjeta son de escritorio; en teléfono va la barra. */
.nw-ficha__actions {
  display: none;
}

/* «Difundir» pasa a «Volver a difundir» con un visto (lo marca ficha.js). */
.nw-share-icon--done,
.is-shared .nw-share-icon {
  display: none;
}
.is-shared .nw-share-icon--done {
  display: inline-block;
}

/* ── Necesita difusión ──────────────────────────────────────────────── */
.nw-ficha__alert {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--v5-r3);
  background: var(--v5-amber-soft);
  color: var(--v5-amber-ink);
  font-size: var(--nw-text-running);
  font-weight: 400;
  line-height: 1.45;
}
.nw-ficha__alert-overline {
  color: var(--v5-tint-myth-ink);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
}

/* ── La historia ────────────────────────────────────────────────────── */
.nw-ficha__story {
  padding: 18px 18px 8px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}
.nw-ficha__story-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  font-size: var(--v5-text-section);
  font-weight: 900;
  letter-spacing: -0.4px;
  line-height: 1.2;
}
.nw-ficha__story-title .nw-i {
  color: var(--v5-primary);
  font-size: 16px;
}
.nw-timeline__step {
  display: flex;
  gap: 10px;
}
.nw-timeline__rail {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
}
/* La línea une cada paso con el siguiente. */
.nw-timeline__rail::after {
  content: '';
  flex: 1 1 auto;
  width: 2px;
  background: var(--v5-border);
}
.nw-timeline__step:last-child .nw-timeline__rail::after {
  content: none;
}
.nw-timeline__dot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--nw-r-round);
  background: var(--nw-primary-tint);
  color: var(--v5-primary);
  font-size: 12px;
}
.nw-timeline__step--rescued .nw-timeline__dot {
  background: var(--nw-amber-tint);
  color: var(--v5-tint-myth-ink);
}
.nw-timeline__step--adopted .nw-timeline__dot {
  background: var(--nw-success-tint);
  color: var(--v5-tint-game-ink);
}
/* Paso abierto («Sigue buscando familia»): punto con anillo. */
.nw-timeline__step--searching .nw-timeline__dot {
  border: 2px solid var(--nw-primary-halo);
  background: transparent;
}
.nw-timeline__step--searching .nw-timeline__dot::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid var(--v5-surface);
  border-radius: var(--nw-r-round);
  background: var(--v5-primary);
}
.nw-timeline__body {
  min-width: 0;
  padding-bottom: 16px;
}
.nw-timeline__step:last-child .nw-timeline__body {
  padding-bottom: 10px;
}
.nw-timeline__label {
  font-size: var(--v5-text-body);
  font-weight: 700;
}
.nw-timeline__step--searching .nw-timeline__label {
  color: var(--v5-primary-deep);
}
.nw-timeline__date {
  margin-left: 4px;
  color: var(--v5-text-muted);
  font-size: var(--v5-text-overline);
  font-weight: 500;
}
.nw-timeline__text {
  margin-top: 3px;
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

/* ── Sobre ──────────────────────────────────────────────────────────── */
.nw-ficha__about {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-ficha__desc {
  max-width: var(--nw-text-max);
  color: var(--v5-text);
  font-size: var(--nw-text-running);
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* Conserva los saltos de línea que escribió la fundación. */
.nw-ficha__desc-text {
  white-space: pre-line;
}
.nw-ficha__desc[data-nw-desc]:not(.is-open) .nw-ficha__desc-head::after {
  content: '…';
}
.nw-ficha__more {
  font-weight: 700;
}
/* Sin JavaScript «leer más» navega a la sección y `:target` abre el resto. */
html:not(.nw-js) .nw-ficha__about:target [data-nw-desc-rest] {
  display: inline;
}
html:not(.nw-js) .nw-ficha__about:target .nw-ficha__desc-head::after {
  content: none;
}
html:not(.nw-js) .nw-ficha__about:target .nw-ficha__more {
  display: none;
}
.nw-ficha__traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── Responsable del caso ───────────────────────────────────────────── */
/* En teléfono la sección es la tarjeta; el panel solo existe en escritorio. */
.nw-org {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r4);
  background: var(--v5-surface);
  box-shadow: var(--v5-shadow-card);
}
.nw-org__panel {
  display: contents;
}
.nw-org__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nw-org__logo {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 4px;
  border-radius: var(--v5-r2);
  background: var(--v5-primary-softer);
  object-fit: contain;
}
.nw-org__logo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 18px;
}
.nw-org__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.nw-org__role {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-overline);
  font-weight: 700;
}
.nw-org__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  overflow-wrap: anywhere;
}
.nw-org__verified {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--v5-tint-game-ink);
  font-size: var(--v5-text-label);
  font-weight: 700;
}
.nw-org__verified .nw-i {
  font-size: 11px;
}
.nw-org__actions {
  display: flex;
  gap: 8px;
}
.nw-org__follow,
.nw-org__profile {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--v5-border-strong);
  border-radius: var(--v5-r-pill);
  color: var(--v5-ink);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
/* «Ver perfil» es el principal; «Seguir fundación», el secundario. */
.nw-org__profile,
.nw-org__profile:hover {
  border-color: var(--v5-primary);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-weight: 700;
}
.nw-org__follow:hover {
  background: var(--v5-surface-muted);
  color: var(--v5-ink);
}
.nw-org__follow[aria-pressed='true'] {
  border-color: var(--v5-primary-soft);
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
}
/* «Gracias a {marca}»: solo con patrocinio real. */
.nw-org__sponsor {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 10px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  background: var(--v5-primary-softer);
}
.nw-org__sponsor-logo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--nw-r-sm);
  object-fit: cover;
}
.nw-org__sponsor-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  color: var(--v5-text-muted);
  font-size: var(--v5-text-overline);
  font-weight: 500;
  line-height: 1.1;
}
.nw-org__sponsor-name {
  color: var(--v5-ink);
  font-size: var(--v5-text-body);
  font-weight: 700;
  line-height: 1.15;
}

/* ── Comentarios y otras formas de ayudar ───────────────────────────── */
.nw-ficha__comments,
.nw-ficha__help {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-ficha__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Fila que lleva a una acción: ícono, título, bajada y flecha. */
.nw-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--v5-border);
  border-radius: var(--v5-r3);
  background: var(--v5-surface);
  color: var(--v5-ink);
}
.nw-option:hover {
  background: var(--v5-surface-muted);
  color: var(--v5-ink);
}
.nw-option__icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--v5-r2);
  font-size: 16px;
}
.nw-option__text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.nw-option__title {
  font-size: var(--v5-text-body);
  font-weight: 700;
}
.nw-option__sub {
  color: var(--v5-text-muted);
  font-size: 12.5px;
  font-weight: 400;
}
.nw-option__go {
  color: var(--v5-text-muted);
  font-size: 13px;
}
.nw-option--foster .nw-option__icon {
  background: var(--v5-teal-soft);
  color: var(--v5-teal-action);
}
.nw-option--donate .nw-option__icon {
  background: var(--v5-amber-soft);
  color: var(--v5-tint-myth-ink);
}
.nw-option--comment {
  border: 1.2px solid var(--nw-primary-line);
  background: var(--v5-primary-softer);
}
.nw-option--comment:hover {
  background: var(--v5-primary-soft);
}
.nw-option--comment .nw-option__icon {
  width: 32px;
  height: 32px;
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 15px;
}
.nw-option--comment .nw-option__title {
  font-size: 13.5px;
  letter-spacing: -0.2px;
}
.nw-option--comment .nw-option__sub {
  font-size: 11.5px;
}
.nw-option--comment .nw-option__go {
  color: var(--v5-primary);
}

/* ── Para cuando llegue a casa (espacio de marca) ───────────────────── */
/* `--nw-brand` y `--nw-brand-soft` los pone la página con el color de la
   campaña; sin ellos el bloque usa los del design system. */
.nw-spot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-spot__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--v5-text-muted);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.nw-spot__kicker::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--v5-border);
}
/* Teléfono: todo a lo ancho y, al final, el beneficio y el botón en una
   misma fila (el cuerpo no es caja aquí: sus hijos van a la grilla). */
.nw-spot__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px dashed var(--v5-border-strong);
  border-radius: var(--v5-r3);
  background: var(--v5-surface);
}
.nw-spot__body {
  display: contents;
}
.nw-spot__image,
.nw-spot__who,
.nw-spot__headline,
.nw-spot__text {
  grid-column: 1 / -1;
}
.nw-spot__image {
  min-width: 0;
  border-radius: var(--v5-r2);
  overflow: hidden;
  background: var(--nw-brand-soft, var(--v5-surface-muted));
}
.nw-spot__image img {
  width: 100%;
  aspect-ratio: 1200 / 627;
  object-fit: cover;
}
.nw-spot__who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.nw-spot__logo {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: var(--nw-r-xs);
  object-fit: cover;
}
.nw-spot__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.nw-tag--brand {
  padding: 4px 9px;
  border-color: transparent;
  background: var(--nw-brand-soft, var(--v5-success-soft));
  color: var(--nw-brand, var(--v5-tint-game-ink));
  letter-spacing: 0.6px;
}
.nw-tag--brand .nw-i {
  font-size: 9px;
}
.nw-spot__headline {
  font-size: var(--v5-text-body-large);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
}
.nw-spot__text {
  color: var(--v5-text-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.nw-spot__benefit {
  grid-column: 1;
  justify-self: start;
  min-width: 0;
}
.nw-spot__coupon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 12px;
  border: 0;
  border-radius: var(--v5-r-pill);
  background: var(--nw-brand-soft, var(--v5-success-soft));
  color: var(--nw-brand, var(--v5-tint-game-ink));
  font-size: var(--v5-text-label);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}
.nw-spot__coupon .nw-i {
  font-size: 11px;
}
.nw-spot__cta,
.nw-spot__cta:hover {
  grid-column: 2;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--v5-r2);
  background: var(--nw-brand, var(--v5-ink));
  color: var(--v5-surface);
  font-size: 13.5px;
  font-weight: 700;
}
.nw-spot__cta .nw-i {
  font-size: 12px;
}

/* ── Esperan un hogar ───────────────────────────────────────────────── */
.nw-ficha__related {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nw-ficha__related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nw-ficha__see-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 700;
}
.nw-ficha__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

/* ── Enlaces a landings ─────────────────────────────────────────────── */
.nw-ficha__landings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nw-ficha__kicker {
  color: var(--v5-text-muted);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.nw-ficha__landing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Barra de acciones fija (teléfono) ──────────────────────────────── */
/* Una sola fila pegada abajo: «Seguir» y «Difundir» compactos y la acción
   principal en el resto. En la ficha no va la barra de navegación (ver
   abajo), así que esta barra reserva el área segura. */
.nw-ficha__bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--v5-border);
  background: var(--v5-surface);
  box-shadow: var(--nw-shadow-bar);
}
.nw-ficha__bar-btn {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  min-height: 48px;
  border: 1px solid var(--v5-border-strong);
  border-radius: var(--v5-r2);
  background: var(--v5-surface);
  color: var(--v5-ink);
  font-size: var(--v5-text-overline);
  font-weight: 700;
  line-height: 1.15;
}
.nw-ficha__bar-btn:hover {
  background: var(--v5-surface-muted);
  color: var(--v5-ink);
}
.nw-ficha__bar-btn .nw-i {
  font-size: 16px;
}
/* «Siguiendo»: lo marca el navegador cuando hay sesión. */
.nw-ficha__bar-btn--follow[aria-pressed='true'] {
  border-color: var(--v5-dupla-soft);
  background: var(--v5-dupla-soft);
  color: var(--v5-dupla-ink);
}
/* Sin acción principal (caso cerrado), «Difundir» ocupa su lugar. */
.nw-ficha__bar-btn--share:last-child {
  flex: 1 1 auto;
  flex-direction: row;
  gap: 8px;
  width: auto;
  border-color: var(--v5-ink);
  background: var(--v5-ink);
  color: var(--v5-surface);
  font-size: 15px;
}
.nw-ficha__bar-cta,
.nw-ficha__bar-cta:hover {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  padding: 4px 12px;
  border-radius: var(--v5-r2);
  background: var(--v5-primary);
  color: var(--v5-surface);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.2;
  text-align: center;
  box-shadow: var(--nw-glow-primary);
}
.nw-ficha__bar-cta:hover {
  background: var(--v5-primary-deep);
}
.nw-ficha__bar-cta--foster,
.nw-ficha__bar-cta--foster:hover {
  background: var(--v5-teal-action);
  box-shadow: none;
}

/* En teléfono la ficha lleva solo su barra de acciones: dos barras fijas
   tapaban ~140 px. La navegación sigue en el HTML (y en escritorio). */
.nw-shell:has(.nw-ficha__bar) .nw-bottom-nav {
  display: none;
}

/* El aviso sale sobre la barra de acciones. */
.nw-ficha .nw-toast {
  --nw-toast-bottom: 76px;
}
/* Con la barra fija abajo, lo que recibe el foco con el teclado no debe
   quedar tapado por ella. */
html:has(.nw-ficha__bar) {
  scroll-padding-bottom: 80px;
}

/* ── Hoja de solicitud ──────────────────────────────────────────────── */
/* Lo que lleva `hidden` no se ve aunque su clase le dé `display` (el
   segundo «Empezar», los pasos, el aviso de fallo). Va aquí y no en
   solicitud.css porque esa hoja llega después del primer pintado. */
.nw-solicitud [hidden] {
  display: none;
}

/* ── Escritorio ─────────────────────────────────────────────────────── */
/* ── Flechas de la galería ──────────────────────────────────────────── */
.nw-ficha__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--v5-surface) 88%, transparent);
  box-shadow: var(--v5-shadow-card);
  color: var(--v5-ink);
  font-size: 22px;
  cursor: pointer;
}
.nw-ficha__nav--prev {
  left: 12px;
}
.nw-ficha__nav--next {
  right: 12px;
}
.nw-ficha__nav:hover {
  background: var(--v5-surface);
}
.nw-ficha__nav:focus-visible {
  outline: 3px solid var(--v5-primary);
  outline-offset: 2px;
}

/* ── Guía de la historia de Instagram ───────────────────────────────── */
/* Lo que lleva `hidden` no se ve aunque su clase ponga un `display`. */
.nw-historia [hidden] {
  display: none;
}
.nw-historia__guia {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.nw-historia__vista {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 112px;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--v5-r3);
  background: var(--v5-primary-soft);
  box-shadow: var(--v5-shadow-card);
  color: var(--v5-primary);
  font-size: 28px;
}
.nw-historia__imagen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Pasos numerados en círculos, como la guía de la app. */
.nw-historia__pasos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: nw-paso;
  color: var(--v5-ink);
  font-size: var(--v5-text-body);
  font-weight: 700;
  line-height: 1.35;
}
.nw-historia__pasos li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  counter-increment: nw-paso;
}
.nw-historia__pasos li::before {
  content: counter(nw-paso);
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--v5-primary-soft);
  color: var(--v5-primary-deep);
  font-size: var(--v5-text-label);
  font-weight: 900;
}
/* Ícono y texto de los botones de la guía, separados. */
.nw-historia .nw-sheet__cta,
.nw-historia .nw-sheet__btn {
  gap: 8px;
}
.nw-historia__copiado {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: var(--v5-r-pill);
  background: var(--v5-success-soft);
  color: var(--v5-tint-game-ink);
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .nw-ficha-header,
  .nw-ficha__bar {
    display: none;
  }

  .nw-ficha {
    gap: 24px;
    max-width: var(--nw-page-max);
    padding: 20px 24px 56px;
  }
  /* Aquí la separación la dan las cajas, no cada bloque. */
  .nw-ficha__referral,
  .nw-ficha__media,
  .nw-ficha__name,
  .nw-ficha__alert,
  .nw-ficha__story,
  .nw-ficha__about,
  .nw-org,
  .nw-ficha__comments,
  .nw-ficha__help,
  .nw-spot,
  .nw-ficha__related,
  .nw-ficha__landings {
    order: 0;
    margin: 0;
  }

  /* Fila 1: la foto y la tarjeta de datos. Si no caben, la tarjeta baja. */
  .nw-ficha__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 32px;
  }
  .nw-ficha__media {
    flex: 1 1 440px;
    max-width: 540px;
  }
  .nw-ficha__photo {
    height: 620px;
  }
  /* Sombra arriba para que «Seguir» se lea sobre cualquier foto. */
  .nw-ficha__photo::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--nw-photo-shade);
    pointer-events: none;
  }
  .nw-ficha__photo-follow,
  .nw-ficha__photo-follow:hover {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--nw-glass-line);
    border-radius: var(--v5-r2);
    background: var(--nw-glass);
    color: var(--v5-surface);
    font-size: 13px;
    font-weight: 700;
  }
  .nw-ficha__photo-follow .nw-i {
    font-size: 18px;
  }
  .nw-ficha__place {
    left: 18px;
    bottom: 18px;
  }

  .nw-ficha__data {
    flex: 999 1 460px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--v5-border);
    border-radius: var(--nw-r-card);
    background: var(--v5-surface);
    box-shadow: var(--nw-shadow-panel);
  }
  .nw-ficha__title {
    font-size: 38px;
    letter-spacing: -1.4px;
    line-height: 1;
  }
  .nw-ficha__chips {
    margin-top: 12px;
  }
  .nw-ficha__wait,
  .nw-ficha__stats {
    margin-top: 16px;
  }
  .nw-stat {
    padding: 10px 8px;
  }
  .nw-stat__num {
    font-size: var(--v5-text-section);
  }

  /* Acciones: la principal y, debajo, hogar temporal, difundir y
     comentarios. */
  .nw-ficha__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
  }
  .nw-ficha__cta,
  .nw-ficha__cta:hover {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    padding: 4px 16px;
    border-radius: var(--v5-r3);
    background: var(--v5-primary);
    color: var(--v5-surface);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.2;
    text-align: center;
    box-shadow: var(--nw-glow-cta);
  }
  .nw-ficha__cta:hover {
    background: var(--v5-primary-deep);
  }
  .nw-ficha__cta .nw-i {
    font-size: 18px;
  }
  .nw-ficha__cta--foster,
  .nw-ficha__cta--foster:hover {
    background: var(--v5-teal-action);
    box-shadow: none;
  }
  .nw-ficha__actions-row {
    display: flex;
    gap: 8px;
  }
  .nw-ficha__action {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 46px;
    padding: 0 12px;
    border-radius: var(--nw-r-md);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.2;
  }
  .nw-ficha__action--foster {
    border: 1.5px solid var(--v5-teal-deep);
    background: var(--v5-surface);
    color: var(--v5-teal-action);
  }
  .nw-ficha__action--foster:hover {
    background: var(--v5-surface-muted);
    color: var(--v5-teal-action);
  }
  .nw-ficha__action--foster .nw-i {
    font-size: var(--v5-text-body);
  }
  .nw-ficha__action--share,
  .nw-ficha__action--share:hover {
    background: var(--v5-ink);
    color: var(--v5-surface);
  }
  .nw-ficha__action--share.is-shared {
    background: var(--v5-tint-game-ink);
  }
  .nw-ficha__action--share .nw-i {
    font-size: 13px;
  }
  .nw-ficha__action--comments {
    flex: none;
    width: 54px;
    padding: 0;
    border: 1px solid var(--v5-border);
    background: var(--v5-surface);
    color: var(--v5-ink);
    font-size: 20px;
  }
  .nw-ficha__action--comments:hover {
    background: var(--v5-surface-muted);
    color: var(--v5-ink);
  }

  /* Dentro de la tarjeta de datos. */
  .nw-ficha__alert {
    margin-top: 16px;
  }
  .nw-ficha__about {
    margin-top: 16px;
  }
  .nw-org {
    gap: 8px;
    margin-top: 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .nw-org__panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--nw-r-md);
    background: var(--v5-primary-softer);
  }
  .nw-org__who {
    flex: 1 1 200px;
  }
  .nw-org__logo {
    width: 36px;
    height: 36px;
    padding: 3px;
    border-radius: var(--nw-r-sm);
    background: var(--v5-surface);
  }
  .nw-org__logo--empty {
    background: var(--v5-primary);
  }
  .nw-org__name {
    font-size: 13.5px;
    letter-spacing: 0;
  }
  .nw-org__verified {
    color: var(--v5-text-muted);
    font-weight: 400;
  }
  .nw-org__verified .nw-i {
    display: none;
  }
  .nw-org__follow,
  .nw-org__profile {
    flex: none;
    font-size: var(--v5-text-label);
    font-weight: 700;
  }
  .nw-org__follow {
    border-width: 1px;
    background: var(--v5-surface);
    color: var(--v5-primary-deep);
  }

  /* Fila 2: la historia y los comentarios. */
  .nw-ficha__mid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
  }
  .nw-ficha__story,
  .nw-ficha__comments {
    flex: 1 1 420px;
    min-width: 0;
  }
  .nw-ficha__story {
    border-radius: var(--nw-r-card);
    box-shadow: none;
  }
  .nw-ficha__story-title,
  .nw-ficha__comments .nw-section-title {
    font-size: var(--v5-text-body);
    letter-spacing: -0.3px;
  }
  .nw-timeline__label {
    font-size: 13px;
  }
  .nw-timeline__text {
    font-size: 12.5px;
  }
  .nw-timeline__step:last-child .nw-timeline__body {
    padding-bottom: 8px;
  }

  /* Dos opciones lado a lado; una sola no se estira a todo el ancho. */
  .nw-ficha__options {
    flex-direction: row;
  }
  .nw-ficha__options .nw-option {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(50% - 5px);
  }

  /* Escritorio: la imagen, el texto y el botón en una fila. */
  .nw-spot__card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 18px;
  }
  .nw-spot__image {
    flex: 0 1 268px;
  }
  .nw-spot__body {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
  }
  .nw-spot__benefit {
    align-self: flex-start;
    margin-top: 3px;
  }
  .nw-spot__cta,
  .nw-spot__cta:hover {
    flex: none;
  }

  .nw-ficha__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .nw-ficha .nw-toast {
    --nw-toast-bottom: 24px;
  }
  html:has(.nw-ficha__bar) {
    scroll-padding-bottom: 0;
  }
}

/* «Difundir» con cuenta: la puerta sin sesión y los canales, con el mismo
   espacio que la hoja; mientras se prepara el enlace los canales esperan. */
.nw-sheet__gate,
.nw-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nw-sheet__gate[hidden],
.nw-sheet__actions[hidden] {
  display: none;
}
.nw-sheet__actions [aria-disabled='true'] {
  opacity: 0.55;
  cursor: progress;
}
