/* ============================================================
   yumi-app.css — Las piezas de la app, en la web.
   Gemelas en php/inc/yumi_piezas.php (marcado) y en la app (src/…).
   Mismos tokens que src/theme/tokens.ts: crema, tinta, coral #C45031,
   oro #f4b740; Outfit para títulos y cifras, Work Sans para el texto.
   ============================================================ */

:root {
  --gold: #f4b740;
  --ok: #2f7a4b;
  --surface-dim: #efece4;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --y-sombra: 0 10px 30px -14px rgba(22, 21, 15, 0.28);
  /* El nombre viejo del acento. Algunas hojas (catálogo, batalla) todavía lo
     piden con el coral #ff705f de respaldo, que ya no es la marca. */
  --primary: var(--accent);
  --primary-dark: var(--accent-press);
}

/* ---------- Las pestañas del feed, solo en el feed ----------
   En la app «Para ti · Siguiendo · Tendencia…» existen solo en Inicio. En la
   web salían encima de la ficha, del perfil o del mapa, donde no hacen nada.
   Fuera del feed se quitan (en móvil ya pasaba) y su alto deja de contar en
   los cálculos de las cabeceras pegajosas. */
.tabbar-nofeed { display: none; }
body:has(.tabbar-nofeed) { --tabbar-h: 0px; }

/* ---------- La barra de abajo en el móvil: la burbuja de la app ----------
   Gemela de src/components/barra-flotante.tsx: una píldora de cristal que
   flota sobre el contenido, con la «lente» gris en la pestaña activa y el
   botón de publicar elevado en el centro. --mnav-h pasa a contar la burbuja
   y su margen, que es lo que usan las barras fijas de cada página para
   ponerse encima. */
@media (max-width: 768px) {
  :root { --mnav-h: 76px; }
  .mobile-nav {
    left: 14px; right: 14px; bottom: calc(10px + var(--sab));
    height: 60px; padding-bottom: 0; border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(246, 244, 239, 0.74);
    -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 8px 20px rgba(22, 21, 15, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  .mnav-item { color: rgba(22, 21, 15, 0.78); font: 600 11px/1 "Work Sans", sans-serif; gap: 3px; }
  .mnav-item [data-lucide] { width: 23px; height: 23px; stroke-width: 1.6; }
  .mnav-item.active { color: var(--accent); }
  .mnav-item.active::before {
    content: ""; position: absolute; inset: 5px 4px; z-index: -1; border-radius: 24px;
    background: rgba(22, 21, 15, 0.075);
  }
  .mnav-fab {
    position: relative; overflow: hidden; width: 54px; height: 54px; margin-top: -24px;
    border: 4px solid var(--bg); background: var(--accent);
    box-shadow: 0 8px 12px -2px rgba(196, 80, 49, 0.45);
  }
  .mnav-fab img { position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; max-width: none; transform: translate(-50%, -50%); }
  /* Cuando estás publicando, se invierte: fondo crema y borde coral. */
  .mnav-fab.active { background: var(--bg); border-color: var(--accent); }
  .mnav-fab.active img { filter: brightness(0) saturate(100%) invert(38%) sepia(62%) saturate(1300%) hue-rotate(345deg) brightness(88%); }
  body { padding-bottom: calc(var(--mnav-h) + var(--sab)); }
}

/* ---------- Filete: cabecera de sección (features/dish/filete.tsx) ---------- */
.y-filete { display: grid; gap: 7px; margin: 0 0 14px; }
.y-filete-fila { display: flex; align-items: center; gap: 12px; }
.y-filete-raya { flex: 1; height: 1px; background: var(--line-strong); }
.y-filete-texto {
  margin: 0; flex-shrink: 1; min-width: 0;
  font: 700 12px/1.2 "Outfit", sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.y-filete-pie { margin: 0 auto; max-width: 56ch; text-align: center; color: var(--ink-soft); font-size: 13.5px; line-height: 1.5; }

/* ---------- Pastilla de nota dorada ---------- */
.y-nota {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: 999px; background: var(--gold); color: #16150f;
  font: 800 13.5px/1.35 "Outfit", sans-serif; font-variant-numeric: tabular-nums;
}

/* ---------- Ceja dorada: «— POSTRES · TARTAS» sobre foto ---------- */
.y-ceja {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold); font: 700 12px/1.2 "Work Sans", sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
}
.y-ceja::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; flex: none; }

/* ---------- Botones ---------- */
.y-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
  font: 700 15px/1 "Work Sans", sans-serif; transition: background-color .18s ease, transform .18s ease;
}
.y-btn:hover { background: var(--accent-press); }
.y-btn:active { transform: scale(0.98); }
.y-btn [data-lucide] { width: 18px; height: 18px; stroke-width: 2; }
.y-btn.is-block { width: 100%; }
.y-btn-sec {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.y-btn-sec:hover { background: var(--surface-dim); }
.y-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.y-link:hover { text-decoration: underline; }

/* ---------- Píldora de votos (VotePill de la ficha / tarjeta) ---------- */
.y-votos {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(22, 21, 15, 0.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff;
}
.y-votos.is-lisa { background: var(--surface); border-color: var(--line); color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.y-voto {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px;
  border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer;
  font: 800 15px/1 "Outfit", sans-serif; font-variant-numeric: tabular-nums; transition: background-color .16s ease, opacity .16s ease;
}
.y-voto [data-lucide] { width: 17px; height: 17px; stroke-width: 2.2; }
.y-voto:hover { background: rgba(255, 255, 255, 0.14); }
.y-votos.is-lisa .y-voto:hover { background: var(--surface-dim); }
.y-voto-up.is-active { background: var(--accent); color: #fff; }
.y-voto-down.is-active { background: var(--danger); color: #fff; }
.y-voto.is-disabled { opacity: 0.38; cursor: not-allowed; }
.y-voto-sep { width: 1px; height: 18px; background: currentColor; opacity: 0.3; }
.y-voto-candado { width: 14px; height: 14px; margin: 0 8px 0 4px; opacity: 0.8; }

/* Cápsula de cristal (comentarios, compartir, herramientas sobre foto) */
.y-capsula {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(22, 21, 15, 0.28);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; text-decoration: none; cursor: pointer; font: 800 15px/1 "Outfit", sans-serif;
  transition: background-color .16s ease;
}
.y-capsula:hover { background: rgba(22, 21, 15, 0.45); }
.y-capsula [data-lucide] { width: 18px; height: 18px; stroke-width: 2; }
.y-capsula.is-redonda { padding: 0; width: 44px; }
.y-capsula.is-saved [data-lucide] { fill: currentColor; }

/* ---------- Tarjeta de un aporte (features/dish/contribution-card.tsx) ---------- */
.y-aporte {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: var(--r-lg); isolation: isolate; min-width: 0;
}
.y-aporte.is-foto { height: 260px; background: #2a261f; color: #fff; }
.y-aporte.is-lisa { min-height: 148px; padding-top: 44px; background: var(--surface-dim); border: 1px solid var(--line); color: var(--ink); }
.y-aporte.is-suelta.is-foto { height: 380px; }
.y-aporte-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.y-aporte.is-foto:hover .y-aporte-foto { transform: scale(1.03); }
/* Dos degradados y no un velo plano: arriba para los chips, abajo para el pie;
   en medio la foto se ve con su color. */
.y-aporte.is-foto::before,
.y-aporte.is-foto::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; pointer-events: none; }
.y-aporte.is-foto::before { top: 0; height: 76px; background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,0)); }
.y-aporte.is-foto::after { bottom: 0; height: 180px; background: linear-gradient(rgba(0,0,0,0) 0%, rgba(0,0,0,.26) 36%, rgba(0,0,0,.84) 100%); }
.y-aporte.is-suelta.is-foto::after { height: 240px; }
.y-aporte-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.y-aporte-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.y-aporte-destacado {
  position: absolute; top: 11px; left: 11px; z-index: 2; max-width: 76%;
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px 5px 9px; border-radius: 999px;
  font: 600 12px/1.3 "Work Sans", sans-serif; pointer-events: none;
}
.y-aporte-destacado span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.y-aporte-destacado [data-lucide] { width: 12px; height: 12px; stroke-width: 2.4; flex: none; }
.y-aporte.is-foto .y-aporte-destacado { background: rgba(196, 80, 49, 0.52); border: 1.5px solid rgba(225, 126, 92, 0.95); color: #fff; }
.y-aporte.is-lisa .y-aporte-destacado { background: var(--accent-soft); color: var(--accent-press); }
.y-aporte-nota {
  position: absolute; top: 11px; right: 11px; z-index: 2; padding: 4px 11px; border-radius: 999px;
  background: var(--gold); color: #16150f; font: 800 13.5px/1.3 "Outfit", sans-serif; pointer-events: none;
}
.y-aporte.is-lisa .y-aporte-nota { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.y-aporte-pie { position: relative; z-index: 2; display: grid; gap: 9px; padding: 13px 14px 14px; pointer-events: none; }
.y-aporte-pie a, .y-aporte-pie button { pointer-events: auto; }
.y-aporte-plato strong { display: block; font: 800 20px/1.15 "Outfit", sans-serif; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-aporte-plato span { display: block; font-size: 12.5px; opacity: 0.86; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-aporte-quien { display: flex; align-items: center; gap: 9px; min-width: 0; }
.y-aporte-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(255,255,255,.85); background: var(--surface-dim); }
.y-aporte.is-lisa .y-aporte-av { border-color: var(--line); }
.y-aporte-nombre { flex: 1; min-width: 0; display: grid; }
.y-aporte-nombre strong { font: 600 14px/1.25 "Work Sans", sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-aporte-nombre small { font-size: 11px; opacity: 0.86; }
.y-aporte-postura [data-lucide] { width: 14px; height: 14px; stroke-width: 2.4; }
.y-aporte.is-lisa .y-aporte-postura.is-up { color: var(--accent); }
.y-aporte.is-lisa .y-aporte-postura.is-down { color: var(--danger); }
.y-aporte-meta {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px; border: 0; background: none;
  color: inherit; opacity: 0.9; cursor: pointer; text-decoration: none; font: 700 13px/1 "Work Sans", sans-serif; font-variant-numeric: tabular-nums;
}
.y-aporte-meta:hover { opacity: 1; }
.y-aporte-meta [data-lucide] { width: 16px; height: 16px; }
.y-aporte-meta.is-liked { opacity: 1; }
.y-aporte-meta.is-liked [data-lucide] { fill: currentColor; }
.y-aporte.is-lisa .y-aporte-meta.is-liked { color: var(--accent); }
.y-aporte-texto { margin: 0; font-size: 13.5px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Tarjeta de invitación «¿Lo has probado?» (la primera de Experiencias) */
.y-probado {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg);
  border: 1.5px dashed var(--accent); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: background-color .16s ease;
}
.y-probado:hover { background: var(--accent-soft); }
.y-probado-ic { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed var(--accent); display: grid; place-items: center; color: var(--accent); flex: none; }
.y-probado-ic [data-lucide] { width: 20px; height: 20px; stroke-width: 2.2; }
.y-probado strong { display: block; font: 700 17px/1.2 "Outfit", sans-serif; }
.y-probado small { display: block; color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.y-probado > [data-lucide] { margin-left: auto; width: 18px; height: 18px; color: var(--accent); flex: none; }

/* ---------- Comentarios (comment-row.tsx) ---------- */
.y-comentar { display: flex; align-items: center; gap: 10px; }
.y-comentar input {
  flex: 1; min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: 400 15px "Work Sans", sans-serif; outline: none;
}
.y-comentar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.y-enviar {
  width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--accent); color: #fff; cursor: pointer; transition: background-color .16s ease, opacity .16s ease;
}
.y-enviar:hover { background: var(--accent-press); }
.y-enviar:disabled { background: var(--line-strong); cursor: default; }
.y-enviar [data-lucide] { width: 19px; height: 19px; stroke-width: 2.2; }
.y-coments { display: grid; gap: 4px; margin-top: 14px; }
.y-coment { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.y-coment:last-child { border-bottom: 0; }
.y-coment-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-dim); }
.y-coment-cuerpo { flex: 1; min-width: 0; }
.y-coment-cab { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.y-coment-cab a { font-weight: 700; color: var(--ink); text-decoration: none; }
.y-coment-cab a:hover { text-decoration: underline; }
.y-coment-cab small { color: var(--ink-mute); font-size: 12px; }
.y-coment-txt { margin: 3px 0 0; color: var(--ink); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.y-coment-acc { margin-left: auto; display: inline-flex; gap: 4px; }
.y-coment-acc button { border: 0; background: none; color: var(--ink-mute); cursor: pointer; font: 600 12px "Work Sans", sans-serif; padding: 2px 6px; border-radius: 6px; }
.y-coment-acc button:hover { color: var(--danger); background: var(--surface-dim); }
.y-coment-acc button.is-reported { color: var(--accent); cursor: default; }
.y-coment-acc [data-lucide] { width: 14px; height: 14px; }
.y-vacio { margin: 14px 0 0; color: var(--ink-soft); text-align: center; font-size: 14px; }
.y-paginas { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: var(--ink-soft); font: 600 13px "Work Sans", sans-serif; }
.y-paginas button {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.y-paginas button:disabled { opacity: .35; cursor: default; }
.y-paginas [data-lucide] { width: 16px; height: 16px; }

/* ---------- Una cara con su anillo (ypCara / PH.cara, gemelas de cara.tsx) ---------- */
.y-cara { display: block; flex: none; border-radius: 50%; object-fit: cover; background: var(--surface-dim); }
/* La caja mide lo mismo que la cara, porque el marco se coloca respecto a ella.
   La clase va DOBLE para ganar a las reglas «… > span» de cada lista: la de
   «Quién lo ha valorado» (.yf-colab > span, para el texto) le daba flex: 1 y
   la estiraba a media fila, y el marco quedaba grande y fuera de la foto. */
span.y-cara-caja.y-cara-caja { position: relative; display: inline-block; flex: none; border: 0; background: none; box-shadow: none; }
.y-cara-caja .y-cara { border-radius: 50%; }
/* El marco desborda un 11 % por cada lado, como en el perfil: la caja no recorta. */
/* Con más peso que los «… img» de cada página (pilas, filas): si no, el marco
   heredaría su tamaño y su borde y se quedaría del tamaño de la cara. */
.y-cara-caja > img.y-cara-marco {
  position: absolute; inset: -11%; width: 122%; height: 122%; max-width: none; margin: 0;
  border: 0; border-radius: 0; background: none; box-shadow: none; object-fit: contain; pointer-events: none;
}

/* ---------- Caras en fila (colaboradores, amigos en común) ---------- */
.y-caras { display: inline-flex; flex: none; }
.y-caras > a, .y-caras > img { margin-left: -7px; }
.y-caras > :first-child { margin-left: 0; }
.y-caras img:not(.y-cara-marco) { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.9); background: var(--surface-dim); display: block; }

/* ---------- Tarjeta de plato «foto con detalle» (dish-card-cover.tsx) ---------- */
.y-plato {
  position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 4 / 5; border-radius: var(--r-xl); background: #2a261f; color: #fff; min-width: 0;
}
.y-plato-foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.y-plato:hover .y-plato-foto { transform: scale(1.03); }
.y-plato::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(22, 21, 15, 0.16); pointer-events: none; }
.y-plato-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.y-plato-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.y-plato-arriba { position: relative; z-index: 2; display: flex; align-items: flex-start; gap: 8px; padding: 14px; pointer-events: none; }
.y-plato-arriba .y-nota { font-size: 15px; padding: 5px 12px; }
.y-plato-sello {
  align-self: center; padding: 5px 10px; border-radius: 999px; background: rgba(22, 21, 15, 0.85); border: 1px solid var(--gold);
  color: var(--gold); font: 700 10.5px/1.2 "Work Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.y-plato-guardar {
  margin-left: auto; width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); cursor: pointer; pointer-events: auto; box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.y-plato-guardar [data-lucide] { width: 19px; height: 19px; }
.y-plato-guardar.is-saved { color: var(--accent); }
.y-plato-guardar.is-saved [data-lucide] { fill: currentColor; }
/* El panel de abajo es un velo PLANO y no un degradado: así el texto se lee
   igual sobre cualquier foto (la app usa el mismo rgba). */
.y-plato-panel { position: relative; z-index: 2; display: grid; gap: 6px; padding: 16px 16px 14px; background: rgba(22, 21, 15, 0.55); pointer-events: none; }
.y-plato-panel a, .y-plato-panel button { pointer-events: auto; }
.y-plato-panel .y-ceja { font-size: 11px; letter-spacing: .18em; }
.y-plato-colab { display: flex; align-items: center; gap: 8px; font: 700 11px/1.2 "Work Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.y-plato-colab .y-caras img { width: 22px; height: 22px; }
.y-plato-titulo { margin: 2px 0 0; font: 800 clamp(20px, 1.6vw, 24px)/1.12 "Outfit", sans-serif; letter-spacing: -0.025em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.y-plato-sitio { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.y-plato-sitio a, .y-plato-sitio > span { color: #fff; text-decoration: none; font: 600 14.5px "Work Sans", sans-serif; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-plato-sitio a:hover { text-decoration: underline; }
.y-plato-sitio b { font: 800 16px "Outfit", sans-serif; white-space: nowrap; }
.y-plato-loc { font: 600 11px/1.2 "Work Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.9); }
/* Las acciones en UNA fila, como en la app: votos, comentarios, compartir y,
   a la derecha, la distancia. Antes la fila podía partirse y la distancia
   bajaba sola a otra línea (21-10-2026). Las píldoras van algo más justas
   que en la ficha para que quepan en una tarjeta de 300-350 px; si aun así no
   cabe, es la distancia la que se recorta con puntos suspensivos, nunca
   salta. */
.y-plato-acciones { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 8px; min-width: 0; }
.y-plato-acciones .y-votos { padding: 2px; flex: none; }
.y-plato-acciones .y-voto { min-height: 30px; padding: 0 8px; gap: 4px; font-size: 13.5px; }
.y-plato-acciones .y-voto [data-lucide] { width: 15px; height: 15px; }
.y-plato-acciones .y-voto-candado { width: 13px; height: 13px; margin: 0 6px 0 2px; }
.y-plato-acciones .y-capsula { flex: none; height: 36px; min-width: 36px; padding: 0 10px; gap: 5px; font-size: 13.5px; }
.y-plato-acciones .y-capsula [data-lucide] { width: 16px; height: 16px; }
.y-plato-acciones .y-capsula.is-redonda { width: 36px; padding: 0; }
.y-plato-acciones .y-plato-dist { flex: 0 1 auto; min-width: 0; margin-left: auto; padding: 0 9px; gap: 4px; font-size: 12.5px; }
.y-plato-dist [data-lucide] { width: 14px; height: 14px; flex: none; }
/* Tarjetas muy estrechas (una ventana de portátil partida, una tableta en
   vertical: ~270 px): las píldoras se aprietan un poco más para que la
   distancia siga entera en la misma fila. El candado del voto fijado sobra
   aquí: el voto contrario ya sale apagado. */
.y-plato { container-type: inline-size; }
@container (max-width: 300px) {
  .y-plato-acciones { gap: 4px; }
  .y-plato-acciones .y-voto { padding: 0 6px; gap: 3px; font-size: 12.5px; }
  .y-plato-acciones .y-voto-candado { display: none; }
  .y-plato-acciones .y-capsula { height: 32px; min-width: 32px; padding: 0 8px; gap: 4px; font-size: 12.5px; }
  .y-plato-acciones .y-capsula.is-redonda { width: 32px; padding: 0; }
  .y-plato-acciones .y-plato-dist { padding: 0 9px; gap: 3px; }
  .y-plato-dist [data-lucide] { display: none; }
  .y-plato-panel .y-plato-titulo { font-size: 16.5px; }
}
.y-plato-dist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-plato-dist[hidden] { display: none; }

/* En escritorio la tarjeta mide un tercio del feed (300-350 px) y no un
   móvil entero: con los tamaños del móvil, el panel de texto se comía más de
   la mitad de la foto. Aquí todo va un punto más pequeño y el panel se queda
   en torno a un tercio. En el móvil siguen los tamaños de la app. */
@media (min-width: 769px) {
  .y-plato-arriba { padding: 12px; }
  .y-plato-arriba .y-nota { font-size: 13.5px; padding: 4px 10px; }
  .y-plato-sello { font-size: 9.5px; padding: 4px 9px; }
  .y-plato-guardar { width: 34px; height: 34px; }
  .y-plato-guardar [data-lucide] { width: 16px; height: 16px; }
  .y-plato-panel { gap: 3px; padding: 11px 13px 12px; }
  .y-plato-panel .y-ceja { font-size: 9.5px; letter-spacing: .16em; gap: 8px; }
  .y-plato-panel .y-ceja::before { width: 12px; }
  .y-plato-colab { gap: 6px; font-size: 9.5px; letter-spacing: .12em; }
  .y-plato-titulo { margin-top: 1px; font-size: 18px; line-height: 1.15; }
  .y-plato-sitio a, .y-plato-sitio > span { font-size: 13px; }
  .y-plato-sitio b { font-size: 14px; }
  .y-plato-loc { font-size: 9.5px; letter-spacing: .14em; }
  .y-plato-acciones { margin-top: 6px; }
}

/* ---------- Persona a la que seguir (person-card.tsx) ---------- */
.y-persona {
  position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 14px 16px; text-align: center;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; min-width: 0;
}
.y-persona-portada { justify-self: stretch; height: 64px; margin: 0 -14px; background: var(--surface-dim) center / cover; position: relative; }
.y-persona-portada::after { content: ""; position: absolute; inset: 0; background: rgba(22,21,15,.18); }
.y-persona-cara { position: relative; width: 64px; height: 64px; margin-top: -32px; border-radius: 50%; display: block; }
/* Sin anillo, el borde del papel que la separa de la portada; con anillo de
   color manda el suyo (va en línea, desde ypCara). */
img.y-persona-av { border: 3px solid var(--surface); }
.y-persona-nombre { margin-top: 4px; color: var(--ink); text-decoration: none; font: 700 15px "Outfit", sans-serif; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.y-persona-nombre:hover { text-decoration: underline; }
.y-persona-dato { color: var(--ink-soft); font-size: 12.5px; }
.y-persona-comun { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: 12px; }
.y-persona-comun .y-caras img { width: 20px; height: 20px; border-color: var(--surface); }
.y-seguir {
  margin-top: 8px; height: 36px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; cursor: pointer; font: 700 13.5px "Work Sans", sans-serif;
}
.y-seguir:hover { background: var(--accent-press); }
.y-seguir.is-following { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.y-persona-tu { margin-top: 8px; height: 36px; display: inline-grid; place-items: center; color: var(--ink-mute); font: 700 13.5px "Work Sans", sans-serif; }

/* ---------- El feed (php/pages/home.php) ---------- */
.yh-rejilla { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@container feed (min-width: 460px) { .yh-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container feed (min-width: 900px) { .yh-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container feed (min-width: 560px) { .yh-rejilla.is-aportes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container feed (min-width: 1100px) { .yh-rejilla.is-aportes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.yh-sugeridos { grid-column: 1 / -1; padding: 18px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.yh-sugeridos-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.yh-sugeridos-cab h2 { margin: 0; font: 700 18px "Outfit", sans-serif; }
.yh-sugeridos-fila { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 190px); gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.yh-sugeridos-fila > * { scroll-snap-align: start; }
/* En pantallas donde el carril derecho va al lado, las sugerencias ya están
   ahí: la tira del feed sobra. */
@media (min-width: 1600px) { .yh-sugeridos { display: none; } }
.yh-rejilla-personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; width: 100%; margin-top: 18px; text-align: left; }
.yh-vacio, .yh-fin { display: grid; justify-items: center; gap: 8px; max-width: 760px; margin: 24px auto 0; padding: 40px 20px; text-align: center; }
.yh-fin { margin-top: 40px; border-top: 1px solid var(--line); }
.yh-fin[hidden] { display: none; }
.yh-vacio-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.yh-vacio-ic [data-lucide] { width: 24px; height: 24px; }
.yh-vacio h2, .yh-fin h2 { margin: 6px 0 0; font: 800 24px/1.2 "Outfit", sans-serif; letter-spacing: -0.02em; }
.yh-vacio p, .yh-fin p { margin: 0 0 10px; max-width: 46ch; color: var(--ink-soft); line-height: 1.55; }
.yh-arriba { margin-top: 6px; color: var(--ink-mute); font-size: 14px; }

/* ---------- Esqueleto ---------- */
.y-esqueleto { background: linear-gradient(90deg, var(--surface-dim), #f6f3ec, var(--surface-dim)); background-size: 200% 100%; animation: y-brillo 1.4s ease infinite; border-radius: var(--r-md); }
@keyframes y-brillo { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  .y-aporte-foto, .y-esqueleto { transition: none; animation: none; }
}

/* ---------- Mirando sin cuenta (php/helpers/invitado_helpers.php) ----------
   La página se ve igual que con cuenta; lo único propio es el aviso «Únete a
   Yumi» que abre PH.pedirCuenta() al intentar votar, guardar, seguir o
   comentar, o al ir a algo tuyo (perfil, avisos, ajustes). */
.y-cuenta { position: fixed; inset: 0; z-index: 4300; display: grid; place-items: center; padding: 20px; }
.y-cuenta[hidden] { display: none; }
.y-cuenta-fondo { position: absolute; inset: 0; background: rgba(22, 21, 15, 0.45); animation: y-cuenta-fundido .18s ease; }
.y-cuenta-caja {
  position: relative; display: grid; justify-items: center; gap: 10px;
  width: min(400px, 100%); padding: 30px 26px 18px; border-radius: var(--r-xl);
  background: var(--surface); box-shadow: var(--y-sombra), 0 24px 60px -20px rgba(22, 21, 15, 0.45);
  text-align: center; animation: y-cuenta-sube .22s cubic-bezier(.2, .8, .2, 1);
}
.y-cuenta-x {
  position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer;
}
.y-cuenta-x:hover { background: var(--surface-dim); color: var(--ink); }
.y-cuenta-x [data-lucide] { width: 20px; height: 20px; }
.y-cuenta-logo { height: 36px; width: auto; margin-bottom: 4px; }
.y-cuenta-titulo { margin: 0; font: 800 23px/1.2 "Outfit", sans-serif; letter-spacing: -0.02em; color: var(--ink); }
.y-cuenta-texto { margin: 0 0 10px; max-width: 32ch; color: var(--ink-soft); line-height: 1.5; }
.y-cuenta-caja .y-btn { width: 100%; }
.y-cuenta-ahora {
  margin-top: 2px; padding: 10px 14px; border: 0; background: none; cursor: pointer;
  color: var(--ink-soft); font: 600 14px "Work Sans", sans-serif;
}
.y-cuenta-ahora:hover { color: var(--ink); }
html.y-cuenta-abierta, html.y-cuenta-abierta body { overflow: hidden; }
@keyframes y-cuenta-fundido { from { opacity: 0; } to { opacity: 1; } }
@keyframes y-cuenta-sube { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* En el móvil, la hoja que sube desde abajo, como en la app. */
@media (max-width: 768px) {
  .y-cuenta { place-items: end stretch; padding: 0; }
  .y-cuenta-caja {
    width: 100%; padding: 14px 20px calc(16px + var(--sab, 0px));
    border-radius: 24px 24px 0 0; animation-name: y-cuenta-hoja;
  }
  .y-cuenta-caja::before { content: ""; width: 40px; height: 4px; margin-bottom: 8px; border-radius: 4px; background: var(--line); }
  .y-cuenta-x { top: 14px; }
}
@keyframes y-cuenta-hoja { from { transform: translateY(100%); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .y-cuenta-fondo, .y-cuenta-caja { animation: none; }
}
